]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix exception in tearDown on ppc buildbot. If there's no directory,
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 26 Jan 2008 07:38:03 +0000 (07:38 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 26 Jan 2008 07:38:03 +0000 (07:38 +0000)
that shouldn't cause the test to fail.  Just like it setUp.

Lib/bsddb/test/test_thread.py

index 94bbc1a3f439da552abb5372caa8ba0f9f9b4c16..9c87db4abe2b76a84b0281ae9ee08140df9821f2 100644 (file)
@@ -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