python3 compatibility

This commit is contained in:
Andriy Zasypkin 2017-09-24 07:52:59 -04:00
parent 2302db4e06
commit 442fb23b18
No known key found for this signature in database
GPG Key ID: 8686E6148F9D9BC2

View File

@ -24,7 +24,7 @@ def init_cache_busting(app):
for filename in filenames:
# compute version component
rooted_filename = os.path.join(dirpath, filename)
with open(rooted_filename, 'r') as f:
with open(rooted_filename, 'rb') as f:
file_hash = hashlib.md5(f.read()).hexdigest()[:7]
# save version to tables