Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad39313 commit d2f6fefCopy full SHA for d2f6fef
git/cmd.py
@@ -315,8 +315,16 @@ def wait(self):
315
:warn: may deadlock if output or error pipes are used and not handled separately.
316
:raise GitCommandError: if the return status is not 0"""
317
status = self.proc.wait()
318
+
319
+ def read_all_from_possibly_closed_stream(stream):
320
+ try:
321
+ return stream.read()
322
+ except ValueError:
323
+ return ''
324
325
if status != 0:
- raise GitCommandError(self.args, status, self.proc.stderr.read())
326
+ errstr = read_all_from_possibly_closed_stream(self.proc.stderr.read)
327
+ raise GitCommandError(self.args, status, errstr)
328
# END status handling
329
return status
330
# END auto interrupt
0 commit comments