summaryrefslogtreecommitdiff
path: root/git/db/cmd/base.py
diff options
context:
space:
mode:
authorMarc Abramowitz <marc@marc-abramowitz.com>2014-08-13 16:18:59 -0700
committerMarc Abramowitz <marc@marc-abramowitz.com>2014-08-13 16:56:45 -0700
commit3d0e05ce63f2c939b3487d404134e58576b2fe3d (patch)
treeb0cfb2cbdba02682cbbeb1f8b5481a257d4d05f2 /git/db/cmd/base.py
parenta66cfe99c1af3d745e929da6a61e1257e3a376b1 (diff)
downloadgitpython-3d0e05ce63f2c939b3487d404134e58576b2fe3d.tar.gz
Fix `git push` hanging when stdout/stderr is big
Fixes GH-145
Diffstat (limited to 'git/db/cmd/base.py')
-rw-r--r--git/db/cmd/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/db/cmd/base.py b/git/db/cmd/base.py
index 9d9ad583..b940fd03 100644
--- a/git/db/cmd/base.py
+++ b/git/db/cmd/base.py
@@ -127,10 +127,11 @@ def get_push_info(repo, remotename_or_url, proc, progress):
# we hope stdout can hold all the data, it should ...
# read the lines manually as it will use carriage returns between the messages
# to override the previous one. This is why we read the bytes manually
- digest_process_messages(proc.stderr, progress)
+ stdout, stderr = proc.communicate()
+ digest_process_messages(StringIO(stderr), progress)
output = IterableList('name')
- for line in proc.stdout.readlines():
+ for line in stdout.splitlines():
try:
output.append(CmdPushInfo._from_line(repo, remotename_or_url, line))
except ValueError:
@@ -139,7 +140,6 @@ def get_push_info(repo, remotename_or_url, proc, progress):
# END exception handling
# END for each line
- finalize_process(proc)
return output