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
This commit is contained in:
Toshio Kuratomi 2016-05-02 11:29:04 -07:00 committed by Matt Clay
parent cd26cc8a0d
commit fa00c69ff2

View file

@ -345,7 +345,7 @@ class ZipArchive(object):
diff += 'c%s++++++.?? %s\n' % (ftype, path)
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]))
timestamp = time.mktime(dt_object.timetuple())
@ -444,7 +444,7 @@ class ZipArchive(object):
if change:
if path not in self.includes:
self.includes.append(path)
diff += '%s %s\n' % (itemized, path)
diff += '%s %s\n' % (''.join(itemized), path)
if self.includes:
unarchived = False