Skip to content

Commit

Permalink
Fix Olympus SpecialMode Unknown Values (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbarton90 authored Apr 21, 2021
1 parent 9df4dd6 commit a518132
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions exifread/tags/makernote/olympus.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ def special_mode(val):
3: 'Bottom to top',
4: 'Top to bottom',
}
if not val or (val[0] not in mode1 or val[2] not in mode2):

if not val:
return val
return '%s - sequence %d - %s' % (mode1[val[0]], val[1], mode2[val[2]])

mode1_val = mode1.get(val[0], "Unknown")
mode2_val = mode2.get(val[2], "Unknown")
return '%s - Sequence %d - %s' % (mode1_val, val[1], mode2_val)


TAGS = {
Expand Down

0 comments on commit a518132

Please sign in to comment.