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

Commit 45361a8

Browse files
committed
Use standard python logging infrastructure to log version warning message.
1 parent 4c65802 commit 45361a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pyocr/libtesseract/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
from ..error import TesseractError
2121
from ..util import digits_only
2222

23+
import logging
24+
logger = logging.getLogger(__name__)
25+
2326

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

0 commit comments

Comments
 (0)