Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Commit

Permalink
Use standard python logging infrastructure to log version warning mes…
Browse files Browse the repository at this point in the history
…sage.
  • Loading branch information
ZoranPavlovic committed Jan 2, 2018
1 parent 4c65802 commit 45361a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyocr/libtesseract/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
from ..error import TesseractError
from ..util import digits_only

import logging
logger = logging.getLogger(__name__)


__all__ = [
'can_detect_orientation',
Expand Down Expand Up @@ -218,7 +221,7 @@ def is_available():
# not tested with 3.03
if (version[0] < 3 or
(version[0] == 3 and version[1] < 4)):
print("Unsupported version [%s]" % ".".join([str(r) for r in version]))
logger.warning("Unsupported version [%s]" % ".".join([str(r) for r in version]))
return False
return True

Expand Down

0 comments on commit 45361a8

Please sign in to comment.