Sfoglia il codice sorgente

Decode string before passsing to regex.match

version-14
Aditya Hase 8 anni fa
parent
commit
00c655b2f4
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      frappe/utils/redis_wrapper.py

+ 1
- 1
frappe/utils/redis_wrapper.py Vedi File

@@ -92,7 +92,7 @@ class RedisWrapper(redis.Redis):

except redis.exceptions.ConnectionError:
regex = re.compile(cstr(key).replace("|", "\|").replace("*", "[\w]*"))
return [k for k in frappe.local.cache.keys() if regex.match(k)]
return [k for k in frappe.local.cache.keys() if regex.match(k.decode())]

def delete_keys(self, key):
"""Delete keys with wildcard `*`."""


Caricamento…
Annulla
Salva