only strip strings

This commit is contained in:
j 2015-02-22 16:37:42 +05:30
parent 9faa54b2e4
commit 7a76e21e99

View file

@ -122,7 +122,7 @@ def info(pdf):
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):
value = [v.strip() for v in value if v.strip()] value = [v.strip() if isinstance(v, str) else v for v in value if v.strip()]
_key = key[3:] _key = key[3:]
if value and _key not in data: if value and _key not in data:
data[_key] = value data[_key] = value