mirror of https://github.com/python/cpython
Fixed two bugs in the bsddb tests. One was reported as #1956
This commit is contained in:
parent
fa767efe06
commit
087f8ae4cf
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue