some attributes don't work
This commit is contained in:
parent
4fcbe401f7
commit
b9a8c91868
1 changed files with 4 additions and 1 deletions
|
@ -149,7 +149,10 @@ def info(pdf):
|
||||||
if xmp:
|
if xmp:
|
||||||
for key in dir(xmp):
|
for key in dir(xmp):
|
||||||
if key.startswith('dc_'):
|
if key.startswith('dc_'):
|
||||||
|
try:
|
||||||
value = getattr(xmp, key)
|
value = getattr(xmp, key)
|
||||||
|
except:
|
||||||
|
continue
|
||||||
if isinstance(value, dict) and 'x-default' in value:
|
if isinstance(value, dict) and 'x-default' in value:
|
||||||
value = value['x-default']
|
value = value['x-default']
|
||||||
elif isinstance(value, list):
|
elif isinstance(value, list):
|
||||||
|
|
Loading…
Reference in a new issue