Skip to content

Commit 39164b0

Browse files
committed
Use proper syntax for conditional expression
(instead of abusing the "short-circuit" property of logical operations)
1 parent 902679c commit 39164b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎git/cmd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def execute(self, command,
609609
bufsize=-1,
610610
stdin=istream,
611611
stderr=PIPE,
612-
stdout=with_stdout and PIPE or open(os.devnull, 'wb'),
612+
stdout=PIPE if with_stdout else open(os.devnull, 'wb'),
613613
shell=self.USE_SHELL,
614614
close_fds=(os.name == 'posix'), # unsupported on windows
615615
universal_newlines=universal_newlines,

0 commit comments

Comments
 (0)