##// END OF EJS Templates
Add ENOLINK constant
David Wolever -
Show More
@@ -514,15 +514,17 b" def get_security_file(filename, profile='default'):"
514 514 return filefind(filename, ['.', pd.security_dir])
515 515
516 516
517 ENOLINK = 1998
518
517 519 def link(src, dst):
518 520 """Hard links ``src`` to ``dst``, returning 0 or errno.
519 521
520 Note that the special errno ``1998`` will be returned if ``os.link`` isn't
522 Note that the special errno ``ENOLINK`` will be returned if ``os.link`` isn't
521 523 supported by the operating system.
522 524 """
523 525
524 526 if not hasattr(os, "link"):
525 return 1998
527 return ENOLINK
526 528 link_errno = 0
527 529 try:
528 530 os.link(src, dst)
General Comments 0
You need to be logged in to leave comments. Login now