bytearray isn't available in python2.4 (#3583)

* Detection of handler depends on the wrong handler failing to list the contents of the tarfile.

Use explicit compression types with the python tarfile library to
achieve that.

* bytearray isn't available in python2.4
reviewable/pr18780/r1
Toshio Kuratomi 9 years ago
parent 0ec3b06208
commit 4a8a292793

@ -345,7 +345,7 @@ class ZipArchive(object):
diff += 'c%s++++++.?? %s\n' % (ftype, path) diff += 'c%s++++++.?? %s\n' % (ftype, path)
continue continue
itemized = bytearray('.%s.......??' % ftype) itemized = list('.%s.......??' % ftype)
dt_object = datetime.datetime(*(time.strptime(pcs[6], '%Y%m%d.%H%M%S')[0:6])) dt_object = datetime.datetime(*(time.strptime(pcs[6], '%Y%m%d.%H%M%S')[0:6]))
timestamp = time.mktime(dt_object.timetuple()) timestamp = time.mktime(dt_object.timetuple())
@ -444,7 +444,7 @@ class ZipArchive(object):
if change: if change:
if path not in self.includes: if path not in self.includes:
self.includes.append(path) self.includes.append(path)
diff += '%s %s\n' % (itemized, path) diff += '%s %s\n' % (''.join(itemized), path)
if self.includes: if self.includes:
unarchived = False unarchived = False

Loading…
Cancel
Save