diff options
| author | jvoisin | 2014-01-06 21:47:02 +0000 |
|---|---|---|
| committer | jvoisin | 2014-01-06 21:47:02 +0000 |
| commit | 9c44ef035133d928afa4cbc41e40883b7460d210 (patch) | |
| tree | 77559b8459bd74d12f118506f0323d4899ea1ce3 /MAT | |
| parent | cb2975459500a7c9819dac4628cb50403d1883f0 (diff) | |
The user can now chose if he wants to includes unsupported files to archive
Diffstat (limited to 'MAT')
| -rw-r--r-- | MAT/archive.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/MAT/archive.py b/MAT/archive.py index 5b25ba0..e6f9e14 100644 --- a/MAT/archive.py +++ b/MAT/archive.py | |||
| @@ -177,12 +177,13 @@ class TarStripper(GenericArchiveStripper): | |||
| 177 | cfile = mat.create_class_file(complete_name, False, add2archive=self.add2archive) | 177 | cfile = mat.create_class_file(complete_name, False, add2archive=self.add2archive) |
| 178 | if cfile: | 178 | if cfile: |
| 179 | cfile.remove_all() | 179 | cfile.remove_all() |
| 180 | tarout.add(complete_name, item.name, filter=self._remove) | 180 | elif self.add2archive or os.path.splitext(item.name)[1] in parser.NOMETA: |
| 181 | logging.info('%s\' format is either not supported or harmless' % item.name) | ||
| 182 | elif item.name in exclude_list: | ||
| 183 | logging.debug('%s is not supported, but MAt was told to add it anyway.' % item.name) | ||
| 181 | else: | 184 | else: |
| 182 | logging.info('%s\' format is not supported or harmless' % item.name) | 185 | continue |
| 183 | basename, ext = os.path.splitext(item.name) | 186 | tarout.add(complete_name, item.name, filter=self._remove) |
| 184 | if self.add2archive or ext in parser.NOMETA: | ||
| 185 | tarout.add(complete_name, item.name, filter=self._remove) | ||
| 186 | tarin.close() | 187 | tarin.close() |
| 187 | tarout.close() | 188 | tarout.close() |
| 188 | self.do_backup() | 189 | self.do_backup() |
