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
(cherry picked from commit 2832731601)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ def is_search_module_loaded():
|
|||||||
out = cache.execute_command("MODULE LIST")
|
out = cache.execute_command("MODULE LIST")
|
||||||
|
|
||||||
parsed_output = " ".join(
|
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
|
return "search" in parsed_output
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user