[Python-checkins] cpython (merge 3.2 -> default): (Merge 3.2) test.support: don't catch OSError when can_symlink() removes the

victor.stinner python-checkins at python.org
Tue Jun 7 12:19:40 CEST 2011


http://hg.python.org/cpython/rev/eaab068fbed4
changeset:   70699:eaab068fbed4
parent:      70697:d7a67e7eb0e4
parent:      70698:3ac7f71696a1
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Tue Jun 07 12:19:34 2011 +0200
summary:
  (Merge 3.2) test.support: don't catch OSError when can_symlink() removes the
temporary symbolic link.

files:
  Lib/test/support.py |  3 ++-
  1 files changed, 2 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
@@ -1561,9 +1561,10 @@
     try:
         os.symlink(TESTFN, symlink_path)
         can = True
-        os.remove(symlink_path)
     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