From ac9fe71733af5fe944cbca62dd688d2e49254497 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Mon, 3 May 2021 17:14:45 +0530 Subject: [PATCH] fix(setup): do not show messsage when exception is handled --- frappe/translate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frappe/translate.py b/frappe/translate.py index 85619a3a6a..aeca758a9d 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -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 = []