From 39164b038409cb66960524e19f60e83d68790325 Mon Sep 17 00:00:00 2001 From: Aleksander Nitecki Date: Thu, 26 May 2016 23:51:19 +0200 Subject: Use proper syntax for conditional expression (instead of abusing the "short-circuit" property of logical operations) --- git/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/cmd.py b/git/cmd.py index 0c3cc8ca..c29e3485 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -609,7 +609,7 @@ class Git(LazyMixin): bufsize=-1, stdin=istream, stderr=PIPE, - stdout=with_stdout and PIPE or open(os.devnull, 'wb'), + stdout=PIPE if with_stdout else open(os.devnull, 'wb'), shell=self.USE_SHELL, close_fds=(os.name == 'posix'), # unsupported on windows universal_newlines=universal_newlines, -- cgit v1.2.1