summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/bsddb/test/test_thread.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py
index 44e3e9c..61a0eb3 100644
--- a/Lib/bsddb/test/test_thread.py
+++ b/Lib/bsddb/test/test_thread.py
@@ -24,6 +24,12 @@ try:
except ImportError:
have_threads = False
+try:
+ WindowsError
+except NameError:
+ class WindowsError(Exception):
+ pass
+
import unittest
from test_all import verbose
@@ -51,6 +57,8 @@ class BaseThreadedTestCase(unittest.TestCase):
self.homeDir = homeDir
try:
os.mkdir(homeDir)
+ except WindowsError, e:
+ if e.errno <> 183: raise # ERROR_ALREADY_EXISTS
except OSError, e:
if e.errno <> errno.EEXIST: raise
self.env = db.DBEnv()