From e18f0804539a7930720c51964a19a18d2ec94a48 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 11 May 2021 15:25:21 +0530 Subject: [PATCH] chore: Hide all warnings in bench console --- frappe/commands/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index b917126696..2451b88cc9 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -488,6 +488,8 @@ frappe.db.connect() @pass_context def console(context): "Start ipython console for a site" + import warnings + site = get_site(context) frappe.init(site=site) frappe.connect() @@ -508,6 +510,7 @@ def console(context): if failed_to_import: print("\nFailed to import:\n{}".format(", ".join(failed_to_import))) + warnings.simplefilter('ignore') IPython.embed(display_banner="", header="", colors="neutral")