From 974ed6828e85eff48526761b8e1054fb02f18bcd Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 30 Oct 2024 11:35:17 +0100 Subject: [PATCH] run_electrum: allow running from git clone to override DeprecationWarning warnings --- run_electrum | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run_electrum b/run_electrum index 179148b85..ef42864ee 100755 --- a/run_electrum +++ b/run_electrum @@ -51,8 +51,9 @@ is_local = (not is_binary_distributable is_git_clone = is_local and os.path.exists(os.path.join(script_dir, ".git")) if is_git_clone: - # developers should probably see all deprecation warnings. - warnings.simplefilter('default', DeprecationWarning) + # developers should probably see all deprecation warnings unless explicitly overruled + if not any(['DeprecationWarning' in x for x in sys.warnoptions]): + warnings.simplefilter('default', DeprecationWarning) if is_local or is_android: sys.path.insert(0, os.path.join(script_dir, 'packages'))