diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-02-04 20:30:37 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-02-04 20:30:37 +0100 |
commit | c6501e454229132808853648b818499ea4888f58 (patch) | |
tree | 2205480030a9f9665264f0ce1056a1b53523e613 /src | |
parent | dc9b63f76b056a9ed4c10c701511f50da4491e09 (diff) | |
download | pyexiv2-c6501e454229132808853648b818499ea4888f58.tar.gz |
XMP MIMEType to string conversion + unit tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/pyexiv2.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py index a24492c..8bb398a 100644 --- a/src/pyexiv2.py +++ b/src/pyexiv2.py @@ -666,6 +666,15 @@ class XmpTag(MetadataTag): else: raise XmpValueError(value, xtype) + elif xtype == 'MIMEType': + if type(value) is dict: + try: + return '%s/%s' % (value['type'], value['subtype']) + except KeyError: + raise XmpValueError(value, xtype) + else: + raise XmpValueError(value, xtype) + elif xtype == 'Text': if type(value) is unicode: try: |