Revert "Fix hash function"

This reverts commit d5680fb617.
This commit is contained in:
Dan Ryan
2018-11-02 18:23:26 -04:00
parent d5680fb617
commit 02b0de9f7b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ class HashCache(SafeFileCache):
if can_hash:
# hash url WITH fragment
hash_value = self.get(new_location.url)
if not hash_value and ((new_location.scheme == "file" and not os.path.isdir(new_location.path)) or new_location.scheme != "file"):
if not hash_value:
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:
@@ -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 and ((new_location.scheme == "file" and not os.path.isdir(new_location.path)) or new_location.scheme != "file"):
+ if not hash_value:
+ 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: