From ab958865d89b3146bb953f826f30da11dc59139a Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Tue, 3 Oct 2023 10:30:58 -0400 Subject: [PATCH] Eliminate istream_ok variable In Git.execute, the stdin argument to Popen is the only one where a compound expression (rather than a single term) is currently passed. So having that be the same in the log message makes it easier to understand what is going on, as well as to see how the information shown in the log corresponds to what Popen receives. --- git/cmd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/git/cmd.py b/git/cmd.py index c35e56703..7c448e3f2 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -973,16 +973,13 @@ def execute( # end handle stdout_sink = PIPE if with_stdout else getattr(subprocess, "DEVNULL", None) or open(os.devnull, "wb") - istream_ok = "None" - if istream: - istream_ok = "" if shell is None: shell = self.USE_SHELL log.debug( "Popen(%s, cwd=%s, stdin=%s, shell=%s, universal_newlines=%s)", redacted_command, cwd, - istream_ok, + "" if istream else "None", shell, universal_newlines, )