diff options
| author | jvoisin | 2011-07-25 03:21:40 +0200 |
|---|---|---|
| committer | jvoisin | 2011-07-25 03:21:40 +0200 |
| commit | ea21231d6d332b5e27e85c0ce0c103cfb56433f8 (patch) | |
| tree | ec1ca1681f44d19a53599af1980a358e751594e0 /lib/archive.py | |
| parent | 7bec354973580216c64889b925e1f7d6a224d7dd (diff) | |
Correct handling of unknown fileformat into zipfile (and fixe many previous-commit-bugs)
Diffstat (limited to 'lib/archive.py')
| -rw-r--r-- | lib/archive.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/archive.py b/lib/archive.py index 21bc5c5..6e3efc0 100644 --- a/lib/archive.py +++ b/lib/archive.py | |||
| @@ -59,9 +59,11 @@ class ZipStripper(GenericArchiveStripper): | |||
| 59 | cfile = mat.create_class_file(name, False, | 59 | cfile = mat.create_class_file(name, False, |
| 60 | self.add2archive) | 60 | self.add2archive) |
| 61 | except: | 61 | except: |
| 62 | #best solution I have found | ||
| 62 | logging.error('%s is not supported' % item.filename) | 63 | logging.error('%s is not supported' % item.filename) |
| 63 | #Returning false is the best solution imho | 64 | _, ext = os.path.splitext(name) |
| 64 | return False | 65 | if ext not in parser.NOMETA: |
| 66 | return False | ||
| 65 | mat.secure_remove(name) | 67 | mat.secure_remove(name) |
| 66 | zipin.close() | 68 | zipin.close() |
| 67 | return False | 69 | return False |
