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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy