From c7887c66483ffa9a839ecf1a53c5ef718dcd1d2d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 8 Jan 2015 09:21:25 +0100 Subject: Improve error handling of fetch/pull line parsing Fixes #48 --- git/cmd.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'git/cmd.py') diff --git a/git/cmd.py b/git/cmd.py index 9bd95553..d0190adf 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -83,7 +83,12 @@ def handle_process_output(process, stdout_handler, stderr_handler, finalizer): # we are good ... line = readline(stream).decode(defenc) if line and handler: - handler(line) + try: + handler(line) + except Exception: + # Keep reading, have to pump the lines empty nontheless + log.error("Line handler exception on line: %s", line, exc_info=True) + # end return line # end dispatch helper # end -- cgit v1.2.3