Merge pull request #13111 from frappe/mergify/bp/version-13-hotfix/pr-13098

fix(setup): do not show messsage when exception is handled (backport #13098)
This commit is contained in:
Suraj Shetty 2021-05-04 10:56:56 +05:30 committed by GitHub
commit c5ee45f905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -548,8 +548,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 = []