Skip to content

Commit ceed353

Browse files
authored
Don't raise exception from decode_maker_note() if strict==False (#243)
1 parent 09c9552 commit ceed353

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎exifread/__init__.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ def process_file(
118118
# (Some apps use MakerNote tags but do not use a format for which we
119119
# have a description, do not process these).
120120
if details and "EXIF MakerNote" in hdr.tags and "Image Make" in hdr.tags:
121-
hdr.decode_maker_note()
121+
try:
122+
hdr.decode_maker_note()
123+
except ValueError as e:
124+
if not strict:
125+
logger.debug("Failed to decode EXIF MakerNote")
126+
else:
127+
raise e
122128

123129
# extract thumbnails
124130
if thumb_ifd and extract_thumbnail:

0 commit comments

Comments
 (0)