Skip to content
Snippets Groups Projects
Commit af41ebde authored by vlorentz's avatar vlorentz
Browse files

Don't assume all GitClient instances have a 'dumb' attribute

Only instances of (subclasses of) AbstractHttpGitClient have this attribute.

For other instances, we can consider it to be False, because the dumb
protocol only exists over HTTP(S).

This issue was found by mypy, thanks to the addition of type annotations
to changes in dulwich 0.20.36 affecting mypy's type inference.
parent 9b47b24b
No related branches found
No related tags found
No related merge requests found
......@@ -252,7 +252,7 @@ class GitLoader(DVCSLoader):
# check if repository only supports git dumb transfer protocol,
# fetched pack file will be empty in that case as dulwich do
# not support it and do not fetch any refs
self.dumb = transport_url.startswith("http") and client.dumb
self.dumb = transport_url.startswith("http") and getattr(client, "dumb", False)
return FetchPackReturn(
remote_refs=utils.filter_refs(remote_refs),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment