[Zodb-checkins] CVS: ZODB3/BDBStorage/tests -
BerkeleyTestBase.py:1.15.14.1
Tim Peters
tim.one at comcast.net
Thu Jul 24 13:00:11 EDT 2003
Update of /cvs-repository/ZODB3/BDBStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv12721/BDBStorage/tests
Modified Files:
Tag: ZODB3-3_2-branch
BerkeleyTestBase.py
Log Message:
_zap_dbhome(): Backported simpler implementation from ZODB4; this one
has the virtue of working on Windows too.
=== ZODB3/BDBStorage/tests/BerkeleyTestBase.py 1.15 => 1.15.14.1 ===
--- ZODB3/BDBStorage/tests/BerkeleyTestBase.py:1.15 Tue Jan 28 11:46:08 2003
+++ ZODB3/BDBStorage/tests/BerkeleyTestBase.py Thu Jul 24 12:00:05 2003
@@ -45,12 +45,8 @@
def _zap_dbhome(self, dir=None):
if dir is None:
dir = self._envdir()
- # XXX Pre-Python 2.3 doesn't ignore errors if the first arg doesn't
- # exist, even if the second is True.
- try:
- shutil.rmtree(dir, 1)
- except OSError, e:
- if e.errno <> errno.ENOENT: raise
+ if os.path.isdir(dir):
+ shutil.rmtree(dir)
def _mk_dbhome(self, dir=None):
if dir is None:
More information about the Zodb-checkins
mailing list