summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2016-02-14 18:22:19 +0100
committerSebastian Thiel <byronimo@gmail.com>2016-02-14 18:22:28 +0100
commit121f6af3a75e4f48acf31b1af2386cdd5bf91e00 (patch)
tree0e673df38937064a73589a6f8da47f91846db558 /git/cmd.py
parent55db0fcce5ec5a92d2bdba8702bdfee9a8bca93d (diff)
downloadgitpython-121f6af3a75e4f48acf31b1af2386cdd5bf91e00.tar.gz
fix(cmd): allow improved errors during clone operation
Related to #383
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 33c15da6..c99c04e2 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -309,9 +309,10 @@ class Git(LazyMixin):
def __getattr__(self, attr):
return getattr(self.proc, attr)
- def wait(self):
+ def wait(self, stderr=None):
"""Wait for the process and return its status code.
+ :param stderr: Previously read value of stderr, in case stderr is already closed.
:warn: may deadlock if output or error pipes are used and not handled separately.
:raise GitCommandError: if the return status is not 0"""
status = self.proc.wait()
@@ -320,7 +321,7 @@ class Git(LazyMixin):
try:
return stream.read()
except ValueError:
- return ''
+ return stderr or ''
if status != 0:
errstr = read_all_from_possibly_closed_stream(self.proc.stderr)