Commit 1af5d95f authored by Tim Peters's avatar Tim Peters

_zap_dbhome(): Backported simpler implementation from ZODB4; this one

has the virtue of working on Windows too.
parent 68366c5f
...@@ -45,12 +45,8 @@ class BerkeleyTestBase(StorageTestBase): ...@@ -45,12 +45,8 @@ class BerkeleyTestBase(StorageTestBase):
def _zap_dbhome(self, dir=None): def _zap_dbhome(self, dir=None):
if dir is None: if dir is None:
dir = self._envdir() dir = self._envdir()
# XXX Pre-Python 2.3 doesn't ignore errors if the first arg doesn't if os.path.isdir(dir):
# exist, even if the second is True. shutil.rmtree(dir)
try:
shutil.rmtree(dir, 1)
except OSError, e:
if e.errno <> errno.ENOENT: raise
def _mk_dbhome(self, dir=None): def _mk_dbhome(self, dir=None):
if dir is None: if dir is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment