mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +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()
|
||||
|
||||
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/":
|
||||
root = xml.etree.ElementTree.fromstring(xmp_tags)
|
||||
for element in root.findall(".//"):
|
||||
xmp_attribs = []
|
||||
for child, value in element.attrib.items():
|
||||
xmp_attribs.append({child.split("}")[1]: value})
|
||||
self._xmp.update({element.tag.split("}")[1]: xmp_attribs})
|
||||
self._xmp[element.tag.split("}")[1]] = {
|
||||
child.split("}")[1]: value
|
||||
for child, value in element.attrib.items()
|
||||
}
|
||||
return self._xmp
|
||||
|
||||
def getim(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user