summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/scriptingprovider.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 79b8bb87..b1012c42 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -368,10 +368,10 @@ class ScriptingProvider(metaclass=_ScriptingProviderMetaclass):
return None
return ScriptingInstance(self, handle = result)
- def _load_module(self, ctx, repo_path:str, plugin_path:str, force:bool) -> bool:
+ def _load_module(self, ctx, repo_path:bytes, plugin_path:bytes, force:bool) -> bool:
return False
- def _install_modules(self, ctx, modules:str) -> bool:
+ def _install_modules(self, ctx, modules:bytes) -> bool:
return False
def _module_installed(self, ctx, module:str) -> bool:
@@ -924,9 +924,10 @@ class PythonScriptingProvider(ScriptingProvider):
return (python_bin, "Success")
- def _install_modules(self, ctx, modules: str) -> bool:
+ def _install_modules(self, ctx, _modules: bytes) -> bool:
# This callback should not be called directly it is indirectly
# executed binary ninja is executed with --pip option
+ modules = _modules.decode("utf-8")
if len(modules.strip()) == 0:
return True
python_lib = settings.Settings().get_string("python.interpreter")
@@ -952,7 +953,7 @@ class PythonScriptingProvider(ScriptingProvider):
log.log_error(f"Python Binary Setting {python_bin_version} incompatible with python library {python_lib_version}")
return False
- args = [str(python_bin), "-m", "pip", "--isolated", "--disable-pip-version-check"]
+ args:List[str] = [str(python_bin), "-m", "pip", "--isolated", "--disable-pip-version-check"]
proxy_settings = settings.Settings().get_string("network.httpsProxy")
if proxy_settings:
args.extend(["--proxy", proxy_settings])