aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-11-25 09:41:52 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-11-25 09:41:52 +0100
commit6f61f4333a35b2c736d36e33c5e9ee721cf0e9aa (patch)
tree3aaf9ac8db55a07028fe9ef01fde995ea47d15cb
parent827e4f15023caffe1d88f547ae6f92eda3287c65 (diff)
downloadpyexiv2-6f61f4333a35b2c736d36e33c5e9ee721cf0e9aa.tar.gz
Correctly convert XMP tags of type "bag closed Choice of ...".
-rw-r--r--src/pyexiv2/xmp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pyexiv2/xmp.py b/src/pyexiv2/xmp.py
index 8e34b07..02f3e43 100644
--- a/src/pyexiv2/xmp.py
+++ b/src/pyexiv2/xmp.py
@@ -117,7 +117,10 @@ class XmpTag(object):
def _set_raw_value(self, value):
self._raw_value = value
if self.type.startswith(('seq', 'bag', 'alt')):
- self._value = map(lambda x: self._convert_to_python(x, self.type[4:]), value)
+ type = self.type[4:]
+ if type.startswith('closed Choice of'):
+ type = type[17:]
+ self._value = map(lambda x: self._convert_to_python(x, type), value)
elif self.type == 'Lang Alt':
self._value = value
elif self.type.startswith('closed Choice of'):