Skip to content

Commit

Permalink
fix(GCS): disable md5 and crc checking temporarily
Browse files Browse the repository at this point in the history
Waiting on googleapis/python-storage#258
Until that patch is released, GCS will error on perfectly good
files randomly if + or / characters are included in the base64
representation of the hash.
  • Loading branch information
william-silversmith committed Sep 2, 2020
1 parent 867f700 commit 0367078
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cloudfiles/interfaces.py
Expand Up @@ -392,14 +392,14 @@ def get_file(self, file_path, start=None, end=None):
except google.cloud.exceptions.NotFound as err:
return (None, None, None, None)

hash_type = "md5"
hash_value = blob.md5_hash if blob.component_count is None else None
# hash_type = "md5"
# hash_value = blob.md5_hash if blob.component_count is None else None

if hash_value is None and blob.crc32c is not None:
hash_type = "crc32c"
hash_value = blob.crc32c
# if hash_value is None and blob.crc32c is not None:
# hash_type = "crc32c"
# hash_value = blob.crc32c

return (content, blob.content_encoding, hash_value, hash_type)
return (content, blob.content_encoding, None, None)

@retry
def size(self, file_path):
Expand Down

0 comments on commit 0367078

Please sign in to comment.