diff options
author | Thomas Khyn <thomas@ksytek.com> | 2014-06-24 00:10:45 +1200 |
---|---|---|
committer | Thomas Khyn <thomas@ksytek.com> | 2014-06-24 00:10:45 +1200 |
commit | 37264fe7643dbcd334a53e3ba6e196a7ef626a0a (patch) | |
tree | d02daad093e42729656b0fd5828e457c2362fc1b | |
parent | 6150388253d82aeb51ef9acb2b7bc018d96be073 (diff) | |
download | pyscss-37264fe7643dbcd334a53e3ba6e196a7ef626a0a.tar.gz |
Fixed make_filename_hash on windows
--HG--
branch : compat_win
-rw-r--r-- | scss/util.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scss/util.py b/scss/util.py index c84d69a..2a168ad 100644 --- a/scss/util.py +++ b/scss/util.py @@ -111,6 +111,9 @@ def make_filename_hash(key): # Python 2 and 3 and thus allowing the test suite to run on both. # TODO better solutions include: not using a repr, not embedding hashes in # the expected test results + if sys.platform == 'win32': + # this is to make sure the hash is the same on win and unix platforms + key_repr = key_repr.replace('\\\\', '/') key_repr = re.sub(b"\\bu'", b"'", key_repr) key_hash = hashlib.md5(key_repr).digest() return base64.b64encode(key_hash, b'__').decode('ascii').rstrip('=') |