[Python-checkins] cpython: Don't leave around a test symlink file.
brett.cannon
python-checkins at python.org
Tue Mar 15 22:32:21 CET 2011
http://hg.python.org/cpython/rev/63173ac7254c
changeset: 68558:63173ac7254c
user: Brett Cannon <brett at python.org>
date: Tue Mar 15 17:32:14 2011 -0400
summary:
Don't leave around a test symlink file.
files:
Lib/test/support.py
diff --git a/Lib/test/support.py b/Lib/test/support.py
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1465,9 +1465,11 @@
global _can_symlink
if _can_symlink is not None:
return _can_symlink
+ symlink_path = TESTFN + "can_symlink"
try:
- os.symlink(TESTFN, TESTFN + "can_symlink")
+ os.symlink(TESTFN, symlink_path)
can = True
+ os.remove(symlink_path)
except (OSError, NotImplementedError):
can = False
_can_symlink = can
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list