| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -315,8 +315,16 @@ def wait(self): | |||
| 315 | 315 | :warn: may deadlock if output or error pipes are used and not handled separately. | |
| 316 | 316 | :raise GitCommandError: if the return status is not 0""" | |
| 317 | 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 | + | ||
| 318 | 325 | if status != 0: | |
| 319 | - 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) | ||
| 320 | 328 | # END status handling | |
| 321 | 329 | return status | |
| 322 | 330 | # END auto interrupt | |
| Back | FazBrowse Home | New Git URL |
0 commit comments