diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-01-22 21:17:50 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-01-22 21:17:50 +0100 |
commit | ec5e7507e774d9b246453ab8bdabf338a54f873b (patch) | |
tree | 546b3d7579d54a2242a477ff8badd256d0654d74 /src | |
parent | 579511a60f05d99827223fd062b072c83a4e9744 (diff) | |
download | pyexiv2-ec5e7507e774d9b246453ab8bdabf338a54f873b.tar.gz |
XMP MIMEType conversion + unit tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/pyexiv2.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py index 8a8f362..7a4d217 100644 --- a/src/pyexiv2.py +++ b/src/pyexiv2.py @@ -559,8 +559,12 @@ class XmpTag(MetadataTag): # TODO return value elif xtype == 'MIMEType': - # TODO - return value + try: + mtype, msubtype = value.split('/', 1) + except ValueError: + return value + else: + return {'type': mtype, 'subtype': msubtype} elif xtype == 'ProperName': # TODO return value |