Skip to content

Commit 7e58e6a

Browse files
committed
Merge pull request #357 from rikdev/autointerrupt_deadlock_fix
fix(cmd): fixed deadlock when stderr buffer overflow
2 parents 51f79ff + 2cc8f1e commit 7e58e6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎git/cmd.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ def wait(self):
310310
"""Wait for the process and return its status code.
311311
312312
:raise GitCommandError: if the return status is not 0"""
313-
status=self.proc.wait()
314-
ifstatus!=0:
315-
raiseGitCommandError(self.args, status, self.proc.stderr.read())
313+
stderr_value=self.proc.communicate()[1]
314+
ifself.proc.returncode!=0:
315+
raiseGitCommandError(self.args, status, stderr_value)
316316
# END status handling
317-
returnstatus
317+
returnself.proc.returncode
318318
# END auto interrupt
319319

320320
classCatFileContentStream(object):

0 commit comments

Comments
(0)