fixed: ZipFile.extractall is buggy in python 2.6.1
This commit is contained in:
parent
4825f13868
commit
8283955765
|
@ -331,7 +331,7 @@ class InternalCommands:
|
|||
os.mkdir(dir)
|
||||
|
||||
zip = zipfile.ZipFile(zipFilename)
|
||||
zip.extractall(dir)
|
||||
self.zipExtractAll(zip, dir)
|
||||
|
||||
def checkGTest(self):
|
||||
|
||||
|
@ -347,7 +347,7 @@ class InternalCommands:
|
|||
os.mkdir(dir)
|
||||
|
||||
zip = zipfile.ZipFile(zipFilename)
|
||||
zip.extractall(dir)
|
||||
self.zipExtractAll(zip, dir)
|
||||
|
||||
def checkGMock(self):
|
||||
|
||||
|
@ -363,7 +363,19 @@ class InternalCommands:
|
|||
os.mkdir(dir)
|
||||
|
||||
zip = zipfile.ZipFile(zipFilename)
|
||||
zip.extractall(dir)
|
||||
self.zipExtractAll(zip, dir)
|
||||
|
||||
# ZipFile.extractall() is buggy in 2.6.1
|
||||
# http://bugs.python.org/issue4710
|
||||
def zipExtractAll(self, z, dir):
|
||||
if not dir.endswith("/"):
|
||||
dir += "/"
|
||||
|
||||
for f in z.namelist():
|
||||
if f.endswith("/"):
|
||||
os.makedirs(dir + f)
|
||||
else:
|
||||
z.extract(f, dir)
|
||||
|
||||
def configure(self, target='', extraArgs=''):
|
||||
|
||||
|
|
Loading…
Reference in New Issue