Skip to content

Commit e72dd2d

Browse files
author
Thorsten Weimann
committed
Merged in rabbbit/python-barcode (pull request #7)
Don't write to stderr if PIL was not detected
2 parents 541e65f + e84c6bc commit e72dd2d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

barcode/writer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
try:
1515
from PIL import Image, ImageDraw, ImageFont # lint:ok
1616
except ImportError:
17-
import sys
18-
sys.stderr.write('PIL not found. Image output disabled.\n\n')
17+
import logging
18+
log = logging.getLogger('pyBarcode')
19+
log.info('PIL not found. Image output disabled')
1920
Image = ImageDraw = ImageFont = None # lint:ok
2021

2122

0 commit comments

Comments
 (0)