public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/process/
Date: Sun, 25 Dec 2022 18:24:39 +0000 (UTC)	[thread overview]
Message-ID: <1671992673.39ae1e0de19462d3953a0680dcc32aa4b3e613f9.arthurzam@gentoo> (raw)

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)


                 reply	other threads:[~2022-12-25 18:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1671992673.39ae1e0de19462d3953a0680dcc32aa4b3e613f9.arthurzam@gentoo \
    --to=arthurzam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox