diff options
author | Brian Curtin <brian@python.org> | 2011-06-13 16:10:32 -0500 |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-06-13 16:10:32 -0500 |
commit | a87d586fd6c4a5dfe4ea89fda288ae8eb66b0134 (patch) | |
tree | 420fe483c679d2225cc8bd82eefaecf783999268 /Lib/test/support.py | |
parent | d25aef55c8b0025dd2ee7de11b526f34ceed6b66 (diff) | |
parent | cdc751720ee7a13ac163da1eedf3a513386c98d4 (diff) | |
download | cpython-git-a87d586fd6c4a5dfe4ea89fda288ae8eb66b0134.tar.gz |
branch merge?
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r-- | Lib/test/support.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index 9c8f6d3dcc..25aab2e5af 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -1487,11 +1487,14 @@ def can_symlink(): 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, AttributeError): can = False + else: + os.remove(symlink_path) _can_symlink = can return can |