Commits

Mark IJbema  committed 48535d1

fix unicode encoding problem

  • Participants
  • Parent commits a7dd4ac

Comments (0)

Files changed (1)

File cache_utils/utils.py

     """
     key = ''.join([c for c in key if c not in CONTROL_CHARACTERS])
     if len(key) > max_length:
-        hash = md5(key).hexdigest()
+        hash = md5(unicode(key).encode('utf8')).hexdigest()
         key = key[:max_length-33]+'-'+hash
     return key