diff options
-rw-r--r-- | linuxnamespaces/atlocation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxnamespaces/atlocation.py b/linuxnamespaces/atlocation.py index 0e2be87..46ac541 100644 --- a/linuxnamespaces/atlocation.py +++ b/linuxnamespaces/atlocation.py @@ -78,7 +78,7 @@ class AtLocation: return thing # Don't copy. obj = super(AtLocation, cls).__new__(cls) if not isinstance(thing, FileDescriptor): - if isinstance(thing, int) or isinstance(thing, HasFileno): + if isinstance(thing, (int, HasFileno)): thing = FileDescriptor(thing) if isinstance(thing, FileDescriptor): if thing < 0 and thing != AT_FDCWD: @@ -150,7 +150,7 @@ class AtLocation: them with a slash as separator. The returned AtLocation borrows its fd if any. """ - if isinstance(other, int) or isinstance(other, HasFileno): + if isinstance(other, (int, HasFileno)): # A an fd is considered an absolute AT_EMPTY_PATH path. return AtLocation(other) non_empty_flags = self.flags & ~AtFlags.AT_EMPTY_PATH |