From 342e9ef69bd8ac5841ccdab43813480f6db41112 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Apr 2015 18:07:04 +0200 Subject: Minor style improvement in PDF handling --- libmat/office.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libmat/office.py') 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): ''' Check if the file is clean from harmful metadatas ''' document = Poppler.Document.new_from_file(self.uri, self.password) - for key in self.meta_list: - if document.get_property(key): - return False - return True + return not any(document.get_property(key) for key in self.meta_list) def remove_all(self): ''' Opening the PDF with poppler, then doing a render -- cgit v1.3