Skip to content

Commit

Permalink
Better handling of empty XMP structured data
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-easterbrook committed May 22, 2023
1 parent bfa368e commit 64e9222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/photini/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Full documentation is at https://photini.readthedocs.io/"""

__version__ = '2023.5.1'
build = '2720 (339bf72)'
build = '2721 (bfa368e)'
2 changes: 1 addition & 1 deletion src/photini/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,10 @@ def get_type(cls, key, value):

@classmethod
def from_exiv2(cls, file_value, tag):
file_value = file_value or {}
if isinstance(file_value, (list, tuple)):
# "legacy" list of string values
file_value = dict(zip(cls.legacy_keys, file_value))
file_value = file_value or {}
for key, value in file_value.items():
file_value[key] = cls.get_type(key, value).from_exiv2(value, tag)
return cls(file_value)
Expand Down

0 comments on commit 64e9222

Please sign in to comment.