Skip to content

Commit 35a7dd5

Browse files
jkuKOLANICH
authored andcommitted
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>
1 parent 0c9c494 commit 35a7dd5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tuf/ngclient/_internal/requests_fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _get_session(self, url: str) -> requests.Session:
121121
if not parsed_url.scheme:
122122
raise exceptions.DownloadError(f"Failed to parse URL {url}")
123123

124-
session_index = (parsed_url.scheme, parsed_url.hostname)
124+
session_index = (parsed_url.scheme, parsed_url.hostname or "")
125125
session = self._sessions.get(session_index)
126126

127127
if not session:

0 commit comments

Comments
 (0)