[Python-checkins] r80771 - python/branches/py3k/Lib/test/support.py
michael.foord
python-checkins at python.org
Wed May 5 00:29:10 CEST 2010
Author: michael.foord
Date: Wed May 5 00:29:10 2010
New Revision: 80771
Log:
Fix error handling removing files in test.support.unlink
Modified:
python/branches/py3k/Lib/test/support.py
Modified: python/branches/py3k/Lib/test/support.py
==============================================================================
--- python/branches/py3k/Lib/test/support.py (original)
+++ python/branches/py3k/Lib/test/support.py Wed May 5 00:29:10 2010
@@ -186,7 +186,7 @@
os.unlink(filename)
except OSError as error:
# The filename need not exist.
- if error.errno != errno.ENOENT:
+ if error.errno not in (errno.ENOENT, errno.ENOTDIR):
raise
def rmtree(path):
@@ -376,6 +376,7 @@
# module name.
TESTFN = "{}_{}_tmp".format(TESTFN, os.getpid())
+
# Assuming sys.getfilesystemencoding()!=sys.getdefaultencoding()
# TESTFN_UNICODE is a filename that can be encoded using the
# file system encoding, but *not* with the default (ascii) encoding
More information about the Python-checkins
mailing list