bug 589400: two small fixes to talos harness - check for existence of dir before trying to create it. r=anodelman, patch=tnikkel

git-svn-id: svn://10.0.0.236/trunk@261106 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bhearsum%mozilla.com
2010-08-26 13:32:51 +00:00
parent dad21f396d
commit d347ca7606

View File

@@ -63,7 +63,8 @@ def zip_extractall(zipfile, rootdir):
"""Python 2.4 compatibility instead of ZipFile.extractall."""
for name in zipfile.namelist():
if name.endswith('/'):
os.makedirs(os.path.join(rootdir, name))
if not os.path.exists(os.path.join(rootdir, name)):
os.makedirs(os.path.join(rootdir, name))
else:
destfile = os.path.join(rootdir, name)
destdir = os.path.dirname(destfile)