summaryrefslogtreecommitdiff
path: root/MAT
diff options
context:
space:
mode:
authorjvoisin2014-06-08 01:37:07 +0200
committerjvoisin2014-06-08 01:37:07 +0200
commitef5a32cfd3c0555ffe5ddf413eeaae61622ebb4b (patch)
treea4edc669b1330a2c96651370eb1db665f7f60be6 /MAT
parent2c63bfa924d1bae86115f54b3af70eed3f92687e (diff)
Improves zip handling
- ZIP_EPOCH is now set correctly - list_unsupported should now work This also fix the testsuite.
Diffstat (limited to 'MAT')
-rw-r--r--MAT/archive.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/MAT/archive.py b/MAT/archive.py
index 4ffe21a..d483dcc 100644
--- a/MAT/archive.py
+++ b/MAT/archive.py
@@ -16,7 +16,7 @@ import parser
16# Zip files do not support dates older than 01/01/1980 16# Zip files do not support dates older than 01/01/1980
17ZIP_EPOCH = (1980, 1, 1, 0, 0, 0) 17ZIP_EPOCH = (1980, 1, 1, 0, 0, 0)
18ZIP_EPOCH_SECONDS = (datetime.datetime(1980, 1, 1, 0, 0, 0) 18ZIP_EPOCH_SECONDS = (datetime.datetime(1980, 1, 1, 0, 0, 0)
19 - datetime.datetime(1970, 1, 1, 0, 0, 0)).total_seconds() 19 - datetime.datetime(1970, 1, 1, 1, 0, 0)).total_seconds()
20 20
21 21
22class GenericArchiveStripper(parser.GenericParser): 22class GenericArchiveStripper(parser.GenericParser):
@@ -95,7 +95,6 @@ class ZipStripper(GenericArchiveStripper):
95 logging.debug('%s from %s has metadata' % (item.filename, self.filename)) 95 logging.debug('%s from %s has metadata' % (item.filename, self.filename))
96 if not list_unsupported: 96 if not list_unsupported:
97 return False 97 return False
98 ret_list.append(item.filename)
99 else: 98 else:
100 logging.info('%s\'s fileformat is not supported or harmless.' 99 logging.info('%s\'s fileformat is not supported or harmless.'
101 % item.filename) 100 % item.filename)