summaryrefslogtreecommitdiff
path: root/MAT
diff options
context:
space:
mode:
authorjvoisin2013-07-16 11:49:37 +0200
committerjvoisin2013-07-16 11:49:37 +0200
commitcb3dfd99998bd71b17d948b1bd88d5757f9cdab3 (patch)
tree0915bda638b643d4580f7d9808b215a09c645b11 /MAT
parent08f63cd4debf8868d274e14da5c39d24963190d3 (diff)
Format + remove useless comment in archive.py
Diffstat (limited to 'MAT')
-rw-r--r--MAT/archive.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/MAT/archive.py b/MAT/archive.py
index 74100a9..59629ac 100644
--- a/MAT/archive.py
+++ b/MAT/archive.py
@@ -10,7 +10,6 @@ import tempfile
10 10
11import parser 11import parser
12import mat 12import mat
13#from tarfile import tarfile
14import tarfile 13import tarfile
15 14
16 15
@@ -67,8 +66,8 @@ class ZipStripper(GenericArchiveStripper):
67 logging.debug('%s has a comment' % self.filename) 66 logging.debug('%s has a comment' % self.filename)
68 return False 67 return False
69 for item in zipin.infolist(): 68 for item in zipin.infolist():
70 #I have not found a way to remove the crap added by zipfile :/ 69 # I have not found a way to remove the crap added by zipfile :/
71 #if not self.is_file_clean(item): 70 # if not self.is_file_clean(item):
72 # logging.debug('%s from %s has compromizing zipinfo' % 71 # logging.debug('%s from %s has compromizing zipinfo' %
73 # (item.filename, self.filename)) 72 # (item.filename, self.filename))
74 # return False 73 # return False
@@ -81,7 +80,7 @@ class ZipStripper(GenericArchiveStripper):
81 if not cfile.is_clean(): 80 if not cfile.is_clean():
82 return False 81 return False
83 except: 82 except:
84 #best solution I have found 83 # best solution I have found
85 logging.info('%s\'s fileformat is not supported, or is a \ 84 logging.info('%s\'s fileformat is not supported, or is a \
86harmless format' % item.filename) 85harmless format' % item.filename)
87 _, ext = os.path.splitext(name) 86 _, ext = os.path.splitext(name)
@@ -166,7 +165,7 @@ class TarStripper(GenericArchiveStripper):
166 tarin.extract(item, self.tempdir) 165 tarin.extract(item, self.tempdir)
167 name = os.path.join(self.tempdir, item.name) 166 name = os.path.join(self.tempdir, item.name)
168 if item.type == '0': # is item a regular file ? 167 if item.type == '0': # is item a regular file ?
169 #no backup file 168 # no backup file
170 try: 169 try:
171 cfile = mat.create_class_file(name, False, 170 cfile = mat.create_class_file(name, False,
172 add2archive=self.add2archive) 171 add2archive=self.add2archive)