diff options
-rw-r--r-- | git/cmd.py | 7 | ||||
-rw-r--r-- | git/remote.py | 2 | ||||
-rw-r--r-- | git/repo/base.py | 2 |
3 files changed, 8 insertions, 3 deletions
@@ -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 diff --git a/git/remote.py b/git/remote.py index 87db5dd4..4d249004 100644 --- a/git/remote.py +++ b/git/remote.py @@ -518,7 +518,7 @@ class Remote(LazyMixin, Iterable): raise GitCommandError(("Error when fetching: %s" % line,), 2) # END handle special messages for cmd in cmds: - if line[1] == cmd: + if len(line) > 1 and line[0] == ' ' and line[1] == cmd: fetch_info_lines.append(line) continue # end find command code diff --git a/git/repo/base.py b/git/repo/base.py index 934a6f03..34fe4046 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -113,7 +113,7 @@ class Repo(object): :raise NoSuchPathError: :return: git.Repo """ epath = os.path.abspath(os.path.expandvars(os.path.expanduser(path or os.getcwd()))) - + self.git = None # should be set for __del__ not to fail in case we raise if not os.path.exists(epath): raise NoSuchPathError(epath) |