summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-05-06 20:04:08 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-05-06 20:04:08 (GMT)
commite93abb7ca65f030ef64784320058c0219c272d9e (patch)
tree39e5d87c24b2a201c38dfa5114b39517941afd8e /Lib/bsddb
parentd4e3bb3d3976ed3e20ad9c00dae010f32aa981ae (diff)
downloadcpython-e93abb7ca65f030ef64784320058c0219c272d9e.zip
cpython-e93abb7ca65f030ef64784320058c0219c272d9e.tar.gz
cpython-e93abb7ca65f030ef64784320058c0219c272d9e.tar.bz2
Handle ERROR_ALREADY_EXISTS.
Diffstat (limited to 'Lib/bsddb')
-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()