This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Work around intermittent mkdir failures in testcfg.py

  • Loading branch information...
piscisaureus committed Nov 30, 2010
1 parent fe804d9 commit d66cf5f32cc8bcfa73b32b8a95911cc46c52b6bf
Showing with 10 additions and 2 deletions.
  1. +10 −2 test/simple/testcfg.py
View
@@ -55,7 +55,10 @@ def AfterRun(self, result):
except:
pass
# make it again.
- mkdir(self.tmpdir)
+ try:
+ mkdir(self.tmpdir)
+ except:
+ pass
def BeforeRun(self):
# delete the whole tmp dir
@@ -64,7 +67,12 @@ def BeforeRun(self):
except:
pass
# make it again.
- mkdir(self.tmpdir)
+ # intermittently fails on win32, so keep trying
+ while not os.path.exists(self.tmpdir):
+ try:
+ mkdir(self.tmpdir)
+ except:
+ pass
def GetLabel(self):
return "%s %s" % (self.mode, self.GetName())

0 comments on commit d66cf5f

Please sign in to comment.