giancan 0 Light Poster

Hi guys,
when I process some images (where apparently the dpi info is missing for python) I get a
Keyerror: 'dpi'.
Is there an easy way to capture this error or set the dpi to 72 if this info is not available?
Thanks a lot