mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Fix exception in tearDown on ppc buildbot. If there's no directory,
that shouldn't cause the test to fail. Just like it setUp.
This commit is contained in:
parent
653272f0cf
commit
960efe9c2d
1 changed files with 5 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ class BaseThreadedTestCase(unittest.TestCase):
|
|||
try:
|
||||
os.mkdir(homeDir)
|
||||
except OSError, e:
|
||||
if e.errno <> errno.EEXIST: raise
|
||||
if e.errno != errno.EEXIST: raise
|
||||
self.env = db.DBEnv()
|
||||
self.setEnvOpts()
|
||||
self.env.open(homeDir, self.envflags | db.DB_CREATE)
|
||||
|
|
@ -72,7 +72,10 @@ class BaseThreadedTestCase(unittest.TestCase):
|
|||
def tearDown(self):
|
||||
self.d.close()
|
||||
self.env.close()
|
||||
shutil.rmtree(self.homeDir)
|
||||
try:
|
||||
shutil.rmtree(self.homeDir)
|
||||
except OSError, e:
|
||||
if e.errno != errno.EEXIST: raise
|
||||
|
||||
def setEnvOpts(self):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue