Skip to content

BF: tolerate errors while parsing fetch lines #1015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions git/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,12 @@ def _get_fetch_info_from_stderr(self, proc, progress):
# end truncate correct list
# end sanity check + sanitization

output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line)
for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info))
for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info):
try:
output.append(FetchInfo._from_line(self.repo, err_line, fetch_line))
except ValueError as exc:
log.debug("Caught error while parsing line: %s", exc)
log.warning("Git informed while fetching: %s", err_line.strip())
return output

def _get_push_info(self, proc, progress):
Expand Down