##// END OF EJS Templates
posix: use inst.errno instead of inst[0] on OSError instances...
Augie Fackler -
r37953:2d919ab6 default
parent child Browse files
Show More
@@ -287,7 +287,7 b' def checklink(path):'
287 return True
287 return True
288 except OSError as inst:
288 except OSError as inst:
289 # link creation might race, try again
289 # link creation might race, try again
290 if inst[0] == errno.EEXIST:
290 if inst.errno == errno.EEXIST:
291 continue
291 continue
292 raise
292 raise
293 finally:
293 finally:
@@ -297,7 +297,7 b' def checklink(path):'
297 return False
297 return False
298 except OSError as inst:
298 except OSError as inst:
299 # sshfs might report failure while successfully creating the link
299 # sshfs might report failure while successfully creating the link
300 if inst[0] == errno.EIO and os.path.exists(name):
300 if inst.errno == errno.EIO and os.path.exists(name):
301 unlink(name)
301 unlink(name)
302 return False
302 return False
303
303
General Comments 0
You need to be logged in to leave comments. Login now