Skip to content

Commit

Permalink
When Content-Length is not available, just download it.
Browse files Browse the repository at this point in the history
Anecdotally, the kind of servers that don't provide Content-Length are also the
kind you don't want to be issuing many small requests to.
  • Loading branch information
thatch committed Dec 6, 2023
1 parent 6cb5a9f commit 8739216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion honesty/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def _fetch_single_deps(
for fe in package.releases[v].files:
if fe.file_type == FileType.BDIST_WHEEL:
LOG.info(f"wheel {fe.url} {fe.size}")
if fe.size is None or fe.size > 20000000:
if fe.size is not None and fe.size > 20000000:
# Gigantic wheels we'll pay the remote read penalty
# the 'or ()' is needed for numpy
return read_metadata_remote_wheel(fe.url) or ()
Expand Down

0 comments on commit 8739216

Please sign in to comment.