Added comment to ValueError

This commit is contained in:
Bei Pang 2019-10-24 16:32:11 -07:00 committed by Andrew Murray
parent bcc766e02d
commit a2b0269167

View File

@ -172,10 +172,11 @@ def APP(self, marker):
# 1 dpcm = 2.54 dpi
dpi *= 2.54
self.info["dpi"] = int(dpi + 0.5), int(dpi + 0.5)
except (KeyError, SyntaxError, ValueError, ZeroDivisionError):
except (KeyError, TypeError, SyntaxError, ValueError, ZeroDivisionError):
# SyntaxError for invalid/unreadable EXIF
# KeyError for dpi not included
# ZeroDivisionError for invalid dpi rational value
# ValueError for x_resolution[0] being an invalid float
self.info["dpi"] = 72, 72