only strip strings

This commit is contained in:
j 2015-02-22 16:37:42 +05:30
parent 9faa54b2e4
commit 7a76e21e99
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ def info(pdf):
if isinstance(value, dict) and 'x-default' in value:
value = value['x-default']
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:]
if value and _key not in data:
data[_key] = value