Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion tests/test_updater_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def setUp(self) -> None:
+ utils.TEST_HOST_ADDRESS
+ ":"
+ str(self.server_process_handler.port)
+ repository_basepath
+ repository_basepath.replace("\\","/")
)

self.metadata_url = f"{url_prefix}/metadata/"
Expand Down
8 changes: 0 additions & 8 deletions tuf/ngclient/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import tempfile
from contextlib import contextmanager
from typing import IO, Iterator
from urllib import parse

from tuf import exceptions

Expand Down Expand Up @@ -61,13 +60,6 @@ def download_file(self, url: str, max_length: int) -> Iterator[IO]:
Yields:
A TemporaryFile object that points to the contents of 'url'.
"""
# 'url.replace('\\', '/')' is needed for compatibility with
# Windows-based systems, because they might use back-slashes in place
# of forward-slashes. This converts it to the common format.
# unquote() replaces %xx escapes in a url with their single-character
# equivalent. A back-slash may beencoded as %5c in the url, which
# should also be replaced with a forward slash.
url = parse.unquote(url).replace("\\", "/")
logger.debug("Downloading: %s", url)

number_of_bytes_received = 0
Expand Down