diff options
author | 2022-12-25 20:24:33 +0200 | |
---|---|---|
committer | 2022-12-25 20:24:33 +0200 | |
commit | 39ae1e0de19462d3953a0680dcc32aa4b3e613f9 (patch) | |
tree | 1f18fb73b8353a45f1c34045e2c9e32f3034fe1a | |
parent | fix small boolean values typo (diff) | |
download | snakeoil-39ae1e0de19462d3953a0680dcc32aa4b3e613f9.tar.gz snakeoil-39ae1e0de19462d3953a0680dcc32aa4b3e613f9.tar.bz2 snakeoil-39ae1e0de19462d3953a0680dcc32aa4b3e613f9.zip |
remove proces.closerange
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/snakeoil/process/__init__.py | 3 | ||||
-rw-r--r-- | src/snakeoil/process/spawn.py | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/snakeoil/process/__init__.py b/src/snakeoil/process/__init__.py index 8966fd65..63c605d5 100644 --- a/src/snakeoil/process/__init__.py +++ b/src/snakeoil/process/__init__.py @@ -92,6 +92,3 @@ class CommandNotFound(Exception): class ProcessNotFound(Exception): def __init__(self, pid): super().__init__(f"nonexistent process: {pid}") - - -closerange = os.closerange diff --git a/src/snakeoil/process/spawn.py b/src/snakeoil/process/spawn.py index 48b60b1a..ce8fe58a 100644 --- a/src/snakeoil/process/spawn.py +++ b/src/snakeoil/process/spawn.py @@ -19,7 +19,7 @@ import sys from ..mappings import ProtectedDict from ..osutils import access -from . import CommandNotFound, closerange, find_binary +from . import find_binary BASH_BINARY = find_binary("bash", fallback="/bin/bash") SANDBOX_BINARY = find_binary("sandbox", fallback="/usr/bin/sandbox") @@ -336,10 +336,10 @@ def _exec( last = 0 for fd in sorted(fd_pipes): if fd != last: - closerange(last, fd) + os.closerange(last, fd) last = fd + 1 - closerange(last, max_fd_limit) + os.closerange(last, max_fd_limit) if cwd is not None: os.chdir(cwd) |