diff --git a/dvc/remote/http.py b/dvc/remote/http.py index bf7e93adb..b93adc395 100644 --- a/dvc/remote/http.py +++ b/dvc/remote/http.py @@ -41,7 +41,7 @@ class RemoteHTTP(RemoteBASE): if response.status_code != 200: raise HTTPError(response.status_code, response.reason) with Tqdm( - total=None if no_progress_bar else self._content_length(response), + total=None if no_progress_bar else self._content_length(from_info), leave=False, bytes=True, desc=from_info.url if name is None else name, diff --git a/tests/unit/remote/test_http.py b/tests/unit/remote/test_http.py index c0d3bd42b..dbd54bcd1 100644 --- a/tests/unit/remote/test_http.py +++ b/tests/unit/remote/test_http.py @@ -26,4 +26,4 @@ def test_download_fails_on_error_code(dvc_repo): remote = RemoteHTTP(dvc_repo, config) with pytest.raises(HTTPError): - remote._download(URLInfo(url) / "file.txt", "file.txt") + remote._download(URLInfo(url) / "missing.txt", "missing.txt")