summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2014-01-06 00:41:32 +0000
committerjvoisin2014-01-06 00:41:32 +0000
commitf9fb9b2ea3a75f0e88ab79c6874e46c512a55056 (patch)
tree7ccee847714e1e6b2e6308ecd76e68d279f21a7a
parent721e42cdce7b03c089720a406a54654a8f379d43 (diff)
Fix a design mistake in archives handling
MAT should now return a set of non-supported files currectly.
-rw-r--r--MAT/archive.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/MAT/archive.py b/MAT/archive.py
index 7192c6f..212e638 100644
--- a/MAT/archive.py
+++ b/MAT/archive.py
@@ -210,14 +210,14 @@ class TarStripper(GenericArchiveStripper):
210 ret_list = [] 210 ret_list = []
211 tarin = tarfile.open(self.filename, 'r' + self.compression) 211 tarin = tarfile.open(self.filename, 'r' + self.compression)
212 for item in tarin.getmembers(): 212 for item in tarin.getmembers():
213 if not self.is_file_clean(item): 213 if not self.is_file_clean(item) and not list_unsupported:
214 return False 214 return False
215 tarin.extract(item, self.tempdir) 215 tarin.extract(item, self.tempdir)
216 complete_name = os.path.join(self.tempdir, item.name) 216 complete_name = os.path.join(self.tempdir, item.name)
217 if item.isfile(): 217 if item.isfile():
218 class_file = mat.create_class_file(complete_name, False, add2archive=self.add2archive) 218 class_file = mat.create_class_file(complete_name, False, add2archive=self.add2archive)
219 if class_file: 219 if class_file:
220 if not class_file.is_clean(): 220 if not class_file.is_clean() and not list_unsupported:
221 return False 221 return False
222 else: 222 else:
223 logging.error('%s\'s format is not supported or harmless' % item.name) 223 logging.error('%s\'s format is not supported or harmless' % item.name)