fix: py3 AttributeError decode
str has no attribute decode in python3, use cstr to convert to str
This commit is contained in:
parent
0bf1c61356
commit
603a60e0a4
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ class RedisWrapper(redis.Redis):
|
|||
|
||||
except redis.exceptions.ConnectionError:
|
||||
regex = re.compile(cstr(key).replace("|", "\|").replace("*", "[\w]*"))
|
||||
return [k for k in list(frappe.local.cache) if regex.match(k.decode())]
|
||||
return [k for k in list(frappe.local.cache) if regex.match(cstr(k))]
|
||||
|
||||
def delete_keys(self, key):
|
||||
"""Delete keys with wildcard `*`."""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue