summaryrefslogtreecommitdiff
path: root/linuxnamespaces/atlocation.py
diff options
context:
space:
mode:
Diffstat (limited to 'linuxnamespaces/atlocation.py')
-rw-r--r--linuxnamespaces/atlocation.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/linuxnamespaces/atlocation.py b/linuxnamespaces/atlocation.py
index 2c827a2..5871db8 100644
--- a/linuxnamespaces/atlocation.py
+++ b/linuxnamespaces/atlocation.py
@@ -17,7 +17,7 @@ import typing
AT_FDCWD = -100
-PathConvertible = typing.Union[bytes, str, os.PathLike]
+PathConvertible = typing.Union[str, os.PathLike]
class AtFlags(enum.IntFlag):
@@ -124,12 +124,6 @@ class AtLocation:
)
if not self.location:
return AtLocation(self.fd, name, self.flags)
- if isinstance(self.location, bytes) or isinstance(name, bytes):
- return AtLocation(
- self.fd,
- os.path.join(os.fsencode(self.location), os.fsencode(name)),
- self.flags,
- )
return AtLocation(
self.fd, pathlib.Path(self.location).joinpath(name), self.flags
)
@@ -344,7 +338,7 @@ class AtLocation:
"""
self.close()
- def __fspath__(self) -> str | bytes:
+ def __fspath__(self) -> str:
"""Return the underlying location if it uniquely defines this object.
Otherwise raise a ValueError.
"""