mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
cope with bad exif error
This commit is contained in:
parent
a823a7b2d8
commit
423347dbe5
@ -94,7 +94,11 @@ def new_image_form(request, path):
|
||||
exif_dict = piexif.load(i.info["exif"])
|
||||
i = reorient_image(i, exif_dict)
|
||||
exif_dict['Exif'][41729] = b'1'
|
||||
# can crash here with bad exif data
|
||||
try:
|
||||
exif = piexif.dump(exif_dict)
|
||||
except:
|
||||
exif = None
|
||||
else:
|
||||
exif = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user