[Zodb-checkins] CVS: ZODB3 - test.py:1.24.4.3
Tim Peters
tim.one at comcast.net
Thu Sep 11 13:27:28 EDT 2003
Update of /cvs-repository/ZODB3
In directory cvs.zope.org:/tmp/cvs-serv8796
Modified Files:
Tag: ZODB3-3_2-branch
test.py
Log Message:
deleteTempDir(): Repair comment; don't use errno.ENOTEMPTY to spare
the message because Windows doesn't use that errno code; when printing
a warning, print something saying where it came from (else it's a
mystery line -- no traceback). This stops gads of mystery lines when
running the tests on Windows, like
[Errno 13] Permission denied: 'c:\\windows\\TEMP\\checkCommitLockUndoAbort'
when all that's gone wrong is merely that the temp directory isn't empty
when the test finishes.
=== ZODB3/test.py 1.24.4.2 => 1.24.4.3 ===
--- ZODB3/test.py:1.24.4.2 Wed Sep 10 13:38:35 2003
+++ ZODB3/test.py Thu Sep 11 12:27:27 2003
@@ -256,9 +256,10 @@
os.rmdir(self.tempdir)
except OSError, err:
# If there's an error other than a non-empty directory, print
- # a warning and continue.
- if err[0] != errno.ENOTEMPTY:
- print err
+ # a warning; continue in any case.
+ # Caution: errno.ENOTEMPTY doesn't work x-platform.
+ if len(os.listdir(self.tempdir)) == 0:
+ print "in test.py's deleteTempDir():", err
def getShortDescription(self, test):
s = self.getDescription(test)
More information about the Zodb-checkins
mailing list