fix: Use frappe.as_unicode
to decode output of redis module list (#31282)
- As of redis 7, a list is added to the result of fetching the module list - This list cannot be "decoded",so use `frappe.as_unicode` that handles bytes as well as other types
This commit is contained in:
parent
fb4f8d870b
commit
2832731601
@ -38,7 +38,7 @@ def is_search_module_loaded():
|
||||
out = cache.execute_command("MODULE LIST")
|
||||
|
||||
parsed_output = " ".join(
|
||||
(" ".join([s.decode() for s in o if not isinstance(s, int)]) for o in out)
|
||||
(" ".join([frappe.as_unicode(s) for s in o if not isinstance(s, int)]) for o in out)
|
||||
)
|
||||
return "search" in parsed_output
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user