Fixed two bugs in the bsddb tests. One was reported as #1956

This commit is contained in:
Christian Heimes 2008-01-28 18:36:44 +00:00
parent fa767efe06
commit 087f8ae4cf
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import shutil
import sys, os, re
from io import StringIO
import tempfile
import test_all
from . import test_all
import unittest
try:

View File

@ -51,7 +51,7 @@ class BaseThreadedTestCase(unittest.TestCase):
self.homeDir = homeDir
try:
os.mkdir(homeDir)
except OSError, e:
except OSError as e:
if e.errno != errno.EEXIST: raise
self.env = db.DBEnv()
self.setEnvOpts()
@ -68,7 +68,7 @@ class BaseThreadedTestCase(unittest.TestCase):
self.env.close()
try:
shutil.rmtree(self.homeDir)
except OSError, e:
except OSError as e:
if e.errno != errno.EEXIST: raise
def setEnvOpts(self):