From 33ee44e50de9ab9be15ed37cc0220a01defd9213 Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 12 Apr 2015 20:37:57 +0200 Subject: [PATCH] restore python3 compatibility --- src/img2pdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index 657a63c..0293e7b 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -510,10 +510,10 @@ def valid_size(string): try: value[0] = float(value[1]) value[0] *= units[value[2]] # convert to points - except ValueError, e: + except ValueError: # assign None if width or height not provided value[0] = None - except KeyError, e: + except KeyError: # if units unrecognized, raise error # otherwise default to pt because units not provided if value[2]: