fix(setup): do not show messsage when exception is handled

(cherry picked from commit ac9fe71733)
This commit is contained in:
Sagar Vora 2021-05-03 17:14:45 +05:30 committed by mergify-bot
parent 10c8e3430c
commit bf33a80042

View file

@ -540,8 +540,12 @@ def extract_messages_from_code(code):
try:
code = frappe.as_unicode(render_include(code))
except (TemplateError, ImportError, InvalidIncludePath, IOError):
# Exception will occur when it encounters John Resig's microtemplating code
# Exception will occur when it encounters John Resig's microtemplating code
except (TemplateError, ImportError, InvalidIncludePath, IOError) as e:
if isinstance(e, InvalidIncludePath):
frappe.clear_last_message()
pass
messages = []