Skip to content

Commit

Permalink
Merge pull request django-compressor#190 from davidbrai/master
Browse files Browse the repository at this point in the history
Read files in binary mode to avoid windows file reading issue.
  • Loading branch information
jezdez committed Jan 10, 2012
2 parents 1b511bc + fedb57e commit 1a82db7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compressor/filters/css_default.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def add_suffix(self, url):
if settings.COMPRESS_CSS_HASHING_METHOD == "mtime": if settings.COMPRESS_CSS_HASHING_METHOD == "mtime":
suffix = get_hashed_mtime(filename) suffix = get_hashed_mtime(filename)
elif settings.COMPRESS_CSS_HASHING_METHOD == "hash": elif settings.COMPRESS_CSS_HASHING_METHOD == "hash":
hash_file = open(filename) hash_file = open(filename, 'rb')
try: try:
suffix = get_hexdigest(hash_file.read(), 12) suffix = get_hexdigest(hash_file.read(), 12)
finally: finally:
Expand Down

0 comments on commit 1a82db7

Please sign in to comment.