diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-11-25 09:41:52 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-11-25 09:41:52 +0100 |
commit | 6f61f4333a35b2c736d36e33c5e9ee721cf0e9aa (patch) | |
tree | 3aaf9ac8db55a07028fe9ef01fde995ea47d15cb | |
parent | 827e4f15023caffe1d88f547ae6f92eda3287c65 (diff) | |
download | pyexiv2-6f61f4333a35b2c736d36e33c5e9ee721cf0e9aa.tar.gz |
Correctly convert XMP tags of type "bag closed Choice of ...".
-rw-r--r-- | src/pyexiv2/xmp.py | 5 |
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'): |