summaryrefslogtreecommitdiff
path: root/libmat/office.py
diff options
context:
space:
mode:
authorjvoisin2015-04-04 18:07:04 +0200
committerjvoisin2015-04-04 18:07:04 +0200
commit342e9ef69bd8ac5841ccdab43813480f6db41112 (patch)
tree1536d784ec9c7618af650049d9281d83099d0ca5 /libmat/office.py
parenteb21be97ac1cd4fea48cf719393fd103f11c1594 (diff)
Minor style improvement in PDF handling
Diffstat (limited to '')
-rw-r--r--libmat/office.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/libmat/office.py b/libmat/office.py
index 2f6fff0..d020c46 100644
--- a/libmat/office.py
+++ b/libmat/office.py
@@ -127,10 +127,7 @@ class PdfStripper(parser.GenericParser):
127 ''' Check if the file is clean from harmful metadatas 127 ''' Check if the file is clean from harmful metadatas
128 ''' 128 '''
129 document = Poppler.Document.new_from_file(self.uri, self.password) 129 document = Poppler.Document.new_from_file(self.uri, self.password)
130 for key in self.meta_list: 130 return not any(document.get_property(key) for key in self.meta_list)
131 if document.get_property(key):
132 return False
133 return True
134 131
135 def remove_all(self): 132 def remove_all(self):
136 ''' Opening the PDF with poppler, then doing a render 133 ''' Opening the PDF with poppler, then doing a render