mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
bug 439050, follow-up patch to close in MozZipFile, make python 2.3 happy, r=ted, djc
This commit is contained in:
parent
a99e4a04e0
commit
3598f9878f
@ -403,7 +403,11 @@ def main():
|
||||
noise = logging.INFO
|
||||
if options.verbose is not None:
|
||||
noise = (options.verbose and logging.DEBUG) or logging.WARN
|
||||
logging.basicConfig(level = noise, format = "%(message)s")
|
||||
if sys.version_info[:2] > (2,3):
|
||||
logging.basicConfig(format = "%(message)s")
|
||||
else:
|
||||
logging.basicConfig()
|
||||
logging.getLogger().setLevel(noise)
|
||||
if not args:
|
||||
jm.makeJar(infile=sys.stdin,
|
||||
sourcedirs=options.s, topsourcedir=options.t,
|
||||
|
@ -138,6 +138,9 @@ class ZipFile(zipfile.ZipFile):
|
||||
all = map(lambda zi: (zi, True), self.filelist) + \
|
||||
map(lambda zi: (zi, False), self._remove)
|
||||
all.sort(lambda l, r: cmp(l[0].header_offset, r[0].header_offset))
|
||||
# empty _remove for multiple closes
|
||||
self._remove = []
|
||||
|
||||
lengths = [all[i+1][0].header_offset - all[i][0].header_offset
|
||||
for i in xrange(len(all)-1)]
|
||||
lengths.append(self.end - all[-1][0].header_offset)
|
||||
|
Loading…
Reference in New Issue
Block a user