mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 11:26:17 +03:00
Changed list of single item dictionaries to dictionary
This commit is contained in:
parent
ad9614be7a
commit
3c482b1b0b
|
@ -6,4 +6,4 @@ def test_getxmp():
|
||||||
xmp = im.getxmp()
|
xmp = im.getxmp()
|
||||||
|
|
||||||
assert isinstance(xmp, dict)
|
assert isinstance(xmp, dict)
|
||||||
assert xmp["Description"][0]["Version"] == "10.4"
|
assert xmp["Description"]["Version"] == "10.4"
|
||||||
|
|
|
@ -1334,10 +1334,10 @@ class Image:
|
||||||
if marker == b"http://ns.adobe.com/xap/1.0/":
|
if marker == b"http://ns.adobe.com/xap/1.0/":
|
||||||
root = xml.etree.ElementTree.fromstring(xmp_tags)
|
root = xml.etree.ElementTree.fromstring(xmp_tags)
|
||||||
for element in root.findall(".//"):
|
for element in root.findall(".//"):
|
||||||
xmp_attribs = []
|
self._xmp[element.tag.split("}")[1]] = {
|
||||||
for child, value in element.attrib.items():
|
child.split("}")[1]: value
|
||||||
xmp_attribs.append({child.split("}")[1]: value})
|
for child, value in element.attrib.items()
|
||||||
self._xmp.update({element.tag.split("}")[1]: xmp_attribs})
|
}
|
||||||
return self._xmp
|
return self._xmp
|
||||||
|
|
||||||
def getim(self):
|
def getim(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user