diff options
Diffstat (limited to 'MAT/archive.py')
| -rw-r--r-- | MAT/archive.py | 9 |
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 | ||
| 11 | import parser | 11 | import parser |
| 12 | import mat | 12 | import mat |
| 13 | #from tarfile import tarfile | ||
| 14 | import tarfile | 13 | import 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 \ |
| 86 | harmless format' % item.filename) | 85 | harmless 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) |
