diff --git a/git/db/cmd/base.py b/git/db/cmd/base.py index 9d9ad5839..b940fd035 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