File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ def test_getxmp():
6
6
xmp = im .getxmp ()
7
7
8
8
assert isinstance (xmp , dict )
9
- assert xmp ["Description" ][0 ][ "Version" ] == "10.4"
9
+ assert xmp ["Description" ]["Version" ] == "10.4"
Original file line number Diff line number Diff line change @@ -1334,10 +1334,10 @@ def getxmp(self):
1334
1334
if marker == b"http://ns.adobe.com/xap/1.0/" :
1335
1335
root = xml .etree .ElementTree .fromstring (xmp_tags )
1336
1336
for element in root .findall (".//" ):
1337
- xmp_attribs = []
1338
- for child , value in element . attrib . items ():
1339
- xmp_attribs . append ({ child . split ( "}" )[ 1 ]: value } )
1340
- self . _xmp . update ({ element . tag . split ( "}" )[ 1 ]: xmp_attribs })
1337
+ self . _xmp [ element . tag . split ( "}" )[ 1 ]] = {
1338
+ child . split ( "}" )[ 1 ]: value
1339
+ for child , value in element . attrib . items ( )
1340
+ }
1341
1341
return self ._xmp
1342
1342
1343
1343
def getim (self ):
You can’t perform that action at this time.
0 commit comments