def EXIF(self): try: content = default_storage.open(str(self.image)).read() im = PILImage.open(BytesIO(content)) except IOError: return try: return EXIF.process_file(im) except: try: return EXIF.process_file(im, details=False) except: return {}
def EXIF(self): try: content = default_storage.open(unicode(self.image)).read() im = PILImage.open(StringIO(content)) except IOError: return try: return EXIF.process_file(im) except: try: return EXIF.process_file(im, details=False) except: return {}