[Python-checkins] cpython (3.2): test.support: can_symlink() removes the temporary symbolic link
victor.stinner
python-checkins at python.org
Tue Jun 7 12:19:39 CEST 2011
http://hg.python.org/cpython/rev/3ac7f71696a1
changeset: 70698:3ac7f71696a1
branch: 3.2
parent: 70686:1a1522f612b0
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue Jun 07 12:17:15 2011 +0200
summary:
test.support: can_symlink() removes the temporary symbolic link
files:
Lib/test/support.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/test/support.py b/Lib/test/support.py
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1487,11 +1487,14 @@
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
except (OSError, NotImplementedError):
can = False
+ else:
+ os.remove(symlink_path)
_can_symlink = can
return can
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list