diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-01-26 07:38:03 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-01-26 07:38:03 (GMT) |
commit | 960efe9c2d9611ae0f2cd76ed62ff4db792bd0d2 (patch) | |
tree | 0607c2a33102a4697159dcd5eb772262a70a72c1 /Lib/bsddb/test/test_thread.py | |
parent | 653272f0cfcdb1aa3a4c4d1656c760c504671575 (diff) | |
download | cpython-960efe9c2d9611ae0f2cd76ed62ff4db792bd0d2.zip cpython-960efe9c2d9611ae0f2cd76ed62ff4db792bd0d2.tar.gz cpython-960efe9c2d9611ae0f2cd76ed62ff4db792bd0d2.tar.bz2 |
Fix exception in tearDown on ppc buildbot. If there's no directory,
that shouldn't cause the test to fail. Just like it setUp.
Diffstat (limited to 'Lib/bsddb/test/test_thread.py')
-rw-r--r-- | Lib/bsddb/test/test_thread.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py index 94bbc1a..9c87db4 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -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 |