Skip to content

Commit

Permalink
Catch KeyError when getting Exif tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jhc13 committed May 16, 2024
1 parent 3087b45 commit 554cb9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion taggui/models/image_list_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def load_directory(self, directory_path: Path):
if any(value in orientations
for value in (5, 6, 7, 8)):
dimensions = (dimensions[1], dimensions[0])
except NoParser as exception:
except (KeyError, NoParser) as exception:
print(f'Failed to get Exif tags for {image_path}: '
f'{exception}', file=sys.stderr)
except (ValueError, OSError) as exception:
Expand Down

0 comments on commit 554cb9b

Please sign in to comment.