From 603a60e0a4b8a060b771b50544ebe822886acf53 Mon Sep 17 00:00:00 2001 From: gregor-horvath <72504811+gregor-horvath@users.noreply.github.com> Date: Thu, 8 Oct 2020 21:12:09 +0200 Subject: [PATCH] fix: py3 AttributeError decode str has no attribute decode in python3, use cstr to convert to str --- frappe/utils/redis_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/redis_wrapper.py b/frappe/utils/redis_wrapper.py index 385bac8e4a..20bbb283a3 100644 --- a/frappe/utils/redis_wrapper.py +++ b/frappe/utils/redis_wrapper.py @@ -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 `*`."""