diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-13 00:42:04 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-14 17:24:26 +0200 |
commit | 5e6827e98c2732863857c0887d5de4138a8ae48b (patch) | |
tree | 151935deb4a0a661bc2156388581a18359a9c342 /git/remote.py | |
parent | 85f38a1bbc8fc4b19ebf2a52a3640b59a5dcf9fe (diff) | |
download | gitpython-5e6827e98c2732863857c0887d5de4138a8ae48b.tar.gz |
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()`.
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 14 |
1 files changed, 8 insertions, 6 deletions
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): |