Skip to content

Commit ab95886

Browse files
committed
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.
1 parent c3fde7f commit ab95886

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

git/cmd.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -973,16 +973,13 @@ def execute(
973973
# end handle
974974

975975
stdout_sink = PIPE if with_stdout else getattr(subprocess, "DEVNULL", None) or open(os.devnull, "wb")
976-
istream_ok = "None"
977-
if istream:
978-
istream_ok = "<valid stream>"
979976
if shell is None:
980977
shell = self.USE_SHELL
981978
log.debug(
982979
"Popen(%s, cwd=%s, stdin=%s, shell=%s, universal_newlines=%s)",
983980
redacted_command,
984981
cwd,
985-
istream_ok,
982+
"<valid stream>" if istream else "None",
986983
shell,
987984
universal_newlines,
988985
)

0 commit comments

Comments
 (0)