diff options
| author | Glenn Smith <glenn@vector35.com> | 2023-02-03 15:54:41 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2023-02-03 15:55:05 -0500 |
| commit | 2090086012923751002522947224572306950039 (patch) | |
| tree | 2a296b86362ce3652d5c6928e974b83f37ab334a /python/scriptingprovider.py | |
| parent | 0040680162346244007937629418757849469432 (diff) | |
Fix ScriptingProviders.update_locals raising causing console entry to fail
Re: #3596
Diffstat (limited to 'python/scriptingprovider.py')
| -rw-r--r-- | python/scriptingprovider.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py index cbd5df93..62462bdf 100644 --- a/python/scriptingprovider.py +++ b/python/scriptingprovider.py @@ -746,7 +746,10 @@ from binaryninja import * PythonScriptingInstance._interpreter.value = self try: - self.update_locals() + try: + self.update_locals() + except: + traceback.print_exc() if isinstance(_code, (lambda: 0).__code__.__class__): self.interpreter.runcode(_code) @@ -1152,7 +1155,10 @@ from binaryninja import * # to avoid updating the local variables every time. So the compromise is to only do an explicit update when the # view is None. if view is None: - self.interpreter.update_locals() + try: + self.interpreter.update_locals() + except: + traceback.print_exc() @abc.abstractmethod def perform_set_current_function(self, func): @@ -1173,7 +1179,10 @@ from binaryninja import * @abc.abstractmethod def perform_complete_input(self, text, state): - self.interpreter.update_locals() + try: + self.interpreter.update_locals() + except: + traceback.print_exc() result = self.interpreter.completer.complete(text, state) if result is None: return "" |
