diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2014-08-17 16:13:09 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2014-08-17 16:13:09 +0200 |
commit | 6d3d94c1e64716062eaeb170d967e9c8040e421f (patch) | |
tree | b0cfb2cbdba02682cbbeb1f8b5481a257d4d05f2 /git/db/cmd/base.py | |
parent | a66cfe99c1af3d745e929da6a61e1257e3a376b1 (diff) | |
parent | 3d0e05ce63f2c939b3487d404134e58576b2fe3d (diff) | |
download | gitpython-6d3d94c1e64716062eaeb170d967e9c8040e421f.tar.gz |
Merge pull request #184 from SurveyMonkey/GH-145_fix_git_push_hang
Fix `git push` hanging when stdout/stderr is big
Diffstat (limited to 'git/db/cmd/base.py')
-rw-r--r-- | git/db/cmd/base.py | 6 |
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 |