Commits

Marco Pensallorto  committed afb6bab

Workaround to get rid of non ASCII-7 chars

  • Participants
  • Parent commits 45eeab9

Comments (0)

Files changed (1)

File storages/backends/moka.py

     fullpath = unicode(os.path.join(self.path, filename)).\
         replace("/", "-")
 
-    return fullpath
+    # another workaround: get rid of non ASCII-7 chars
+    return u"".join(filter(lambda c: ord(c) <= 127, list(fullpath)))
 
 
 class MokaStorage(QueuedRemoteStorage):
 
         return self.local
 
+    def get_cache_key(self, name):
+        return '%s%s' % (self.cache_prefix, urllib.quote(name))
+
+
     def get_storage(self, name):
         """Storage retrieval."""