diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index 1564c8f5e..6f9c0f52a 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -1101,7 +1101,7 @@ def _save(im, fp, filename): atts[k] = v.encode('ascii', errors='ignore') continue - except (Exception, msg): + except Exception as msg: # if we don't have an ifd here, just punt. if Image.DEBUG: print (msg)