From 07903e9ef196e66b747aea12e0fb9d3012ea8cad Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Thu, 28 Mar 2019 09:56:01 +0100 Subject: [PATCH] im was not defined -- don't print it (closes: #61) --- src/img2pdf.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index 27e5b8c..efe8e44 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -1021,14 +1021,9 @@ def get_imgmetadata(imgdata, imgformat, default_dpi, colorspace, rawdata=None): elif value == 8: rotation = 270 elif value in (2, 4, 5, 7): - raise Exception( - 'Image "%s": Unsupported flipped ' - "rotation mode (%d)" % (im.name, value) - ) + raise Exception("Unsupported flipped rotation mode (%d)" % value) else: - raise Exception( - 'Image "%s": invalid rotation (%d)' % (im.name, value) - ) + raise Exception("Invalid rotation (%d)" % value) logging.debug("rotation = %d°", rotation)