summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-03-14 09:29:28 +0100
committerHelmut Grohne <helmut@subdivi.de>2024-03-14 09:29:28 +0100
commit0eaaa74e51408458a162bf5d2d7813056365268e (patch)
treee77c74651dd1d4811998fb40a8dde9921a08216e
parent76fe71a4c990bd98938e94cc08356a4c917371f5 (diff)
downloadpython-linuxnamespaces-0eaaa74e51408458a162bf5d2d7813056365268e.tar.gz
rename AtLocation.symlink to symlink_to
This mirrors what was done for pathlib.Path to avoid confusion about argument order.
-rw-r--r--linuxnamespaces/__init__.py2
-rw-r--r--linuxnamespaces/atlocation.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/linuxnamespaces/__init__.py b/linuxnamespaces/__init__.py
index 625f6c6..02d1feb 100644
--- a/linuxnamespaces/__init__.py
+++ b/linuxnamespaces/__init__.py
@@ -356,7 +356,7 @@ def populate_dev(
for fn in files:
(newdev / fn).mknod(stat.S_IFREG)
for fn, target in symlinks.items():
- (newdev / fn).symlink(target)
+ (newdev / fn).symlink_to(target)
if pidns:
mount(
"devpts",
diff --git a/linuxnamespaces/atlocation.py b/linuxnamespaces/atlocation.py
index 2bd3f51..08c0de5 100644
--- a/linuxnamespaces/atlocation.py
+++ b/linuxnamespaces/atlocation.py
@@ -313,7 +313,7 @@ class AtLocation:
assert self.location
return os.rmdir(self.location, dir_fd=self.fd_or_none)
- def symlink(self, linktarget: PathConvertible) -> None:
+ def symlink_to(self, linktarget: PathConvertible) -> None:
"""Create a symlink at self pointing to linktarget. Note that this
method has its arguments reversed compared to the usual os.symlink,
because the dir_fd is applicable to the second argument there.