diff options
author | Barry Scott <barry@barrys-emacs.org> | 2016-05-29 13:34:35 +0100 |
---|---|---|
committer | Barry Scott <barry@barrys-emacs.org> | 2016-05-29 13:34:35 +0100 |
commit | 5077fc7e4031e53f730676df4d8df5165b1d36cc (patch) | |
tree | c321d6b7340b28fd69daae860702e00d2ac0a02f /git/cmd.py | |
parent | e836e5cdcc7e3148c388fe8c4a1bab7eeb00cc3f (diff) | |
download | gitpython-5077fc7e4031e53f730676df4d8df5165b1d36cc.tar.gz |
Return all the stderr messge after an error is detected for pull()
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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() |