From 90293204b2ea6ade0033c4dd581ff8c5d4dc9a7c Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Tue, 17 Jul 2018 16:07:01 +0200 Subject: [PATCH] src/img2pdf.py: use logging.warning because warn() is deprecated --- src/img2pdf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index c70963a..4fbfa19 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -638,10 +638,10 @@ def get_imgmetadata(imgdata, imgformat, default_dpi, colorspace, rawdata=None): ics = imgdata.mode if ics in ["LA", "PA", "RGBA"]: - logging.warn("Image contains transparency which cannot be retained in PDF.") - logging.warn("img2pdf will not perform a lossy operation.") - logging.warn("You can remove the alpha channel using imagemagick:") - logging.warn(" $ convert input.png -background white -alpha remove -alpha off output.png") + logging.warning("Image contains transparency which cannot be retained in PDF.") + logging.warning("img2pdf will not perform a lossy operation.") + logging.warning("You can remove the alpha channel using imagemagick:") + logging.warning(" $ convert input.png -background white -alpha remove -alpha off output.png") raise Exception("Refusing to work on images with alpha channel")