Skip to content

Commit

Permalink
Fix hash function
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Ryan <[email protected]>
  • Loading branch information
techalchemy committed Nov 2, 2018
1 parent 77b3edd commit d5680fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pipenv/patched/piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_hash(self, location):
if can_hash:
# hash url WITH fragment
hash_value = self.get(new_location.url)
if not hash_value:
if not hash_value and ((new_location.scheme == "file" and not os.path.isdir(new_location.path)) or new_location.scheme != "file"):
hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
hash_value = hash_value.encode('utf8') if hash_value else None
if can_hash:
Expand Down
2 changes: 1 addition & 1 deletion tasks/vendoring/patches/patched/piptools.patch
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ index bf69803..31b85b9 100644
+ if can_hash:
+ # hash url WITH fragment
+ hash_value = self.get(new_location.url)
+ if not hash_value:
+ if not hash_value and ((new_location.scheme == "file" and not os.path.isdir(new_location.path)) or new_location.scheme != "file"):
+ hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
+ hash_value = hash_value.encode('utf8') if hash_value else None
+ if can_hash:
Expand Down

0 comments on commit d5680fb

Please sign in to comment.