Skip to content

Commit

Permalink
Update piptools/repositories/pypi.py
Browse files Browse the repository at this point in the history
Co-authored-by: Albert Tugushev <[email protected]>
  • Loading branch information
michael-k and atugushev committed Nov 21, 2022
1 parent c1789cf commit 1e4aa42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,10 @@ def _get_matching_candidates(
return candidates_by_version[matching_versions[0]]

def _get_file_hash(self, link: Link) -> str:
log.debug(f"Hashing {link.show_url}")
if link.hash_name == FAVORITE_HASH:
log.debug(f"Getting hash from link {link.show_url}")
return ":".join([FAVORITE_HASH, link.hash])
log.debug(f"Hashing {link.show_url}")
h = hashlib.new(FAVORITE_HASH)
with open_local_or_remote_file(link, self.session) as f:
# Chunks to iterate
Expand Down

0 comments on commit 1e4aa42

Please sign in to comment.