fix: any takes an iterable not multi args

This commit is contained in:
Gavin D'souza 2021-05-07 13:24:48 +05:30
parent 855efcfd59
commit d43046a4cb
2 changed files with 2 additions and 2 deletions

View file

@ -231,7 +231,7 @@ def get_traceback() -> str:
"""
exc_type, exc_value, exc_tb = sys.exc_info()
if not any(exc_type, exc_value, exc_tb):
if not any([exc_type, exc_value, exc_tb]):
return ""
trace_list = traceback.format_exception(exc_type, exc_value, exc_tb)

View file

@ -61,7 +61,7 @@ def update_controller_context(context, controller):
except (frappe.PermissionError, frappe.PageDoesNotExistError, frappe.Redirect):
raise
except:
if not any(frappe.flags.in_migrate, frappe.flags.in_website_search_build):
if not any([frappe.flags.in_migrate, frappe.flags.in_website_search_build]):
frappe.errprint(frappe.utils.get_traceback())
if hasattr(module, "get_children"):