From 5e6827e98c2732863857c0887d5de4138a8ae48b Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Thu, 13 Oct 2016 00:42:04 +0200 Subject: remote, #525: FIX BUG push-cmd misses error messages + Bug discovered after enabling TC in prev commit and rework of fetch. + remote_tc: unitestize assertions. + util: DEL unused `_mktemp()`. --- git/remote.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'git/remote.py') diff --git a/git/remote.py b/git/remote.py index 2b924aaf..71585a41 100644 --- a/git/remote.py +++ b/git/remote.py @@ -27,7 +27,6 @@ from git.util import ( ) from git.util import ( join_path, - finalize_process ) from git.cmd import handle_process_output, Git from gitdb.util import join @@ -681,16 +680,19 @@ class Remote(LazyMixin, Iterable): try: output.append(PushInfo._from_line(self, line)) except ValueError: - # if an error happens, additional info is given which we cannot parse + # If an error happens, additional info is given which we parse below. pass - # END exception handling - # END for each line + handle_process_output(proc, stdout_handler, progress_handler, finalizer=None, decode_streams=False) + stderr_text = progress.error_lines and '\n'.join(progress.error_lines) or '' try: - handle_process_output(proc, stdout_handler, progress_handler, finalize_process, decode_streams=False) + proc.wait(stderr=stderr_text) except Exception: - if len(output) == 0: + if not output: raise + elif stderr_text: + log.warning("Error lines received while fetching: %s", stderr_text) + return output def _assert_refspec(self): -- cgit v1.2.3