summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git/cmd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/cmd.py b/git/cmd.py
index d28e0902..702733ea 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -581,7 +581,7 @@ class Git(LazyMixin):
stdout_sink = (PIPE
if with_stdout
- else getattr(subprocess, 'DEVNULL', open(os.devnull, 'wb')))
+ else getattr(subprocess, 'DEVNULL', None) or open(os.devnull, 'wb'))
log.debug("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s)",
command, cwd, universal_newlines, shell)
try: