public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/process/
@ 2022-12-25 18:24 Arthur Zamarin
  0 siblings, 0 replies; only message in thread
From: Arthur Zamarin @ 2022-12-25 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     39ae1e0de19462d3953a0680dcc32aa4b3e613f9
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 18:24:33 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 18:24:33 2022 +0000
URL:        https://gitweb.gentoo.org/proj/pkgcore/snakeoil.git/commit/?id=39ae1e0d

remove proces.closerange

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/snakeoil/process/__init__.py | 3 ---
 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)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-25 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-25 18:24 [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/process/ Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox