Revert "bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)" (#17219)

This reverts commit 111772fc27.
This commit is contained in:
Victor Stinner 2019-11-18 12:26:37 +01:00 committed by GitHub
parent 04c79d6088
commit 59c80889ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 27 deletions

View file

@ -418,12 +418,7 @@ class _NormalAccessor(_Accessor):
unlink = os.unlink
if hasattr(os, "link"):
link_to = os.link
else:
@staticmethod
def link_to(self, target):
raise NotImplementedError("os.link() not available on this system")
link_to = os.link
rmdir = os.rmdir
@ -435,7 +430,6 @@ class _NormalAccessor(_Accessor):
if supports_symlinks:
symlink = os.symlink
else:
@staticmethod
def symlink(a, b, target_is_directory):
raise NotImplementedError("symlink() not available on this system")
else: