From 5077fc7e4031e53f730676df4d8df5165b1d36cc Mon Sep 17 00:00:00 2001 From: Barry Scott Date: Sun, 29 May 2016 13:34:35 +0100 Subject: Return all the stderr messge after an error is detected for pull() --- git/cmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git/cmd.py') diff --git a/git/cmd.py b/git/cmd.py index c29e3485..821bf299 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -307,7 +307,7 @@ class Git(LazyMixin): def __getattr__(self, attr): return getattr(self.proc, attr) - def wait(self, stderr=None): + def wait(self, stderr=''): """Wait for the process and return its status code. :param stderr: Previously read value of stderr, in case stderr is already closed. @@ -317,7 +317,7 @@ class Git(LazyMixin): def read_all_from_possibly_closed_stream(stream): try: - return stream.read() + return stderr + stream.read() except ValueError: return stderr or '' @@ -678,7 +678,7 @@ class Git(LazyMixin): # strip trailing "\n" if stderr_value.endswith(b"\n"): stderr_value = stderr_value[:-1] - status = proc.wait() + status = proc.wait(stderr=stderr_value) # END stdout handling finally: proc.stdout.close() -- cgit v1.2.1