mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
RequestsFetcher: satisfy mypy with small fix
The typeshed annotations for requests say that the hostname could be None: I think this is untrue but let's keep mypy happy. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This commit is contained in:
parent
0c9c494261
commit
35a7dd58c5
1 changed files with 1 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ def _get_session(self, url: str) -> requests.Session:
|
|||
if not parsed_url.scheme:
|
||||
raise exceptions.DownloadError(f"Failed to parse URL {url}")
|
||||
|
||||
session_index = (parsed_url.scheme, parsed_url.hostname)
|
||||
session_index = (parsed_url.scheme, parsed_url.hostname or "")
|
||||
session = self._sessions.get(session_index)
|
||||
|
||||
if not session:
|
||||
|
|
|
|||
Loading…
Reference in a new issue