summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py5
-rw-r--r--python/scriptingprovider.py2
2 files changed, 7 insertions, 0 deletions
diff --git a/python/__init__.py b/python/__init__.py
index 2d0f7065..60b739e7 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -365,3 +365,8 @@ def connect_vscode_debugger(port=5678):
debugpy.listen(("127.0.0.1", port))
debugpy.wait_for_client()
execute_on_main_thread(lambda: debugpy.debug_this_thread())
+
+
+class UIPluginInHeadlessError(Exception):
+ def __init__(self, *args, **kwargs):
+ Exception.__init__(self, *args, **kwargs)
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 49088304..83b7d7a4 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -902,6 +902,8 @@ class PythonScriptingProvider(ScriptingProvider):
log_error(f"Failed to find python plugin: {repo_path}/{module}")
except ImportError as ie:
log_error(f"Failed to import python plugin: {repo_path}/{module}: {ie}")
+ except binaryninja.UIPluginInHeadlessError:
+ log_info(f"Ignored python UI plugin: {repo_path}/{module}")
return False
def _run_args(self, args):