mercurial/posix.py
changeset 26901 0e3d093c468e
parent 26885 8b2fbe3f59b1
parent 26889 1aa5083cbebb
child 27236 b0d90fef16b6
--- a/mercurial/posix.py	Wed Nov 04 12:14:18 2015 -0500
+++ b/mercurial/posix.py	Wed Nov 11 15:08:08 2015 -0600
@@ -182,14 +182,16 @@
                 # link creation might race, try again
                 if inst[0] == errno.EEXIST:
                     continue
-                # sshfs might report failure while successfully creating the link
-                if inst[0] == errno.EIO and os.path.exists(name):
-                    os.unlink(name)
-                return False
+                raise
             finally:
                 fd.close()
         except AttributeError:
             return False
+        except OSError as inst:
+            # sshfs might report failure while successfully creating the link
+            if inst[0] == errno.EIO and os.path.exists(name):
+                os.unlink(name)
+            return False
 
 def checkosfilename(path):
     '''Check that the base-relative path is a valid filename on this platform.