From a3b542285331823ab8e05662a3ae0d5fc73f974f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 3 May 2012 17:20:03 -0400 Subject: Better handling of dependencies regarding to PDF processing --- lib/office.py | 3 ++- lib/strippers.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/office.py b/lib/office.py index 8350244..b557a6c 100644 --- a/lib/office.py +++ b/lib/office.py @@ -179,8 +179,9 @@ class PdfStripper(parser.GenericParser): return True except: print('Unable to remove all metadata from %s, please install\ - pdfrw' % self.output) +pdfrw' % self.output) return False + return True def get_meta(self): ''' diff --git a/lib/strippers.py b/lib/strippers.py index 7d27874..dfdf1ea 100644 --- a/lib/strippers.py +++ b/lib/strippers.py @@ -23,11 +23,12 @@ STRIPPERS = { try: # PDF support import poppler import cairo + import pdfrw STRIPPERS['application/x-pdf'] = office.PdfStripper STRIPPERS['application/pdf'] = office.PdfStripper except ImportError: - print('Unable to import python-poppler and/or python-cairo: no PDF \ - support') + print('Unable to import python-poppler and/or python-cairo \ +and/or pdfrw: no PDF support') try: # mutangen-python : audio format support import mutagen -- cgit v1.3