From b9a8c91868ccf1479d419213f3c36dbdf119bf2b Mon Sep 17 00:00:00 2001 From: j Date: Wed, 13 Jan 2016 11:33:47 +0530 Subject: [PATCH] some attributes don't work --- oml/media/pdf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oml/media/pdf.py b/oml/media/pdf.py index da2ef1d..ba56ae8 100644 --- a/oml/media/pdf.py +++ b/oml/media/pdf.py @@ -149,7 +149,10 @@ def info(pdf): if xmp: for key in dir(xmp): if key.startswith('dc_'): - value = getattr(xmp, key) + try: + value = getattr(xmp, key) + except: + continue if isinstance(value, dict) and 'x-default' in value: value = value['x-default'] elif isinstance(value, list):