Python3 fix for reading hashes

This commit is contained in:
2016-01-12 07:35:04 +08:00
parent b4ee92ad44
commit c017cf856e
+1 -1
View File
@@ -370,7 +370,7 @@ def create_all(app, user=None, password=None, bucket_name=None,
if app.config['FLASKS3_ONLY_MODIFIED']:
try:
hashes_object = s3.get_object(Bucket=bucket_name, Key='.file-hashes')
hashes = json.loads(str(hashes_object['Body'].read()))
hashes = json.loads(str(hashes_object['Body'].read().decode()))
except ClientError as e:
logger.warn("No file hashes found: %s" % e)
hashes = None