Skip to content

Commit e84c6bc

Browse files
committed
Don't write to stderr if PIL was not detected
It's valid to use svg only
1 parent 7b33d96 commit e84c6bc

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)