[Pkg-privacy-commits] [mat] 08/68: Fix some mistakes found thanks to the previous commit

Sascha Steinbiss sascha at steinbiss.name
Sun Jan 3 12:32:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository mat.

commit 627c6f4fb042440ccf4a206cc78da164138ae91c
Author: jvoisin <julien.voisin at dustri.org>
Date:   Tue Nov 3 15:53:54 2015 +0100

    Fix some mistakes found thanks to the previous commit
---
 libmat/office.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmat/office.py b/libmat/office.py
index 5a57b57..00b8f34 100644
--- a/libmat/office.py
+++ b/libmat/office.py
@@ -80,7 +80,7 @@ class OpenXmlStripper(archive.TerminalZipStripper):
         """ Remove harmful metadata, by deleting everything that doesn't end with '.rels' in the
         'docProps' folder. """
         return super(OpenXmlStripper, self).remove_all(
-            beginning_blacklist='docProps/', whitelist='.rels')
+            beginning_blacklist=['docProps/'], whitelist=['.rels'])
 
     def is_clean(self):
         """ Check if the file is clean from harmful metadatas.
@@ -91,7 +91,7 @@ class OpenXmlStripper(archive.TerminalZipStripper):
         if clean_super is False:
             return False
 
-        zipin = zipfile.ZipFile(self.filename, 'r')
+        zipin = zipfile.ZipFile(self.filename)
         for item in zipin.namelist():
             if item.startswith('docProps/'):
                 return False
@@ -103,7 +103,7 @@ class OpenXmlStripper(archive.TerminalZipStripper):
         """
         metadata = super(OpenXmlStripper, self).get_meta()
 
-        zipin = zipfile.ZipFile(self.filename, 'r')
+        zipin = zipfile.ZipFile(self.filename)
         for item in zipin.namelist():
             if item.startswith('docProps/'):
                 metadata[item] = 'harmful content'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/mat.git



More information about the Pkg-privacy-commits mailing list