diff --git a/git/cmd.py b/git/cmd.py index 0c3cc8cae..c29e34854 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -609,7 +609,7 @@ def execute(self, command, 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,