Skip to content

Commit 1c3ba3d

Browse files
committed
Fix dependency check for new API format
1 parent dbbf95f commit 1c3ba3d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

python/scriptingprovider.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
from .enums import ScriptingProviderExecuteResult, ScriptingProviderInputReadyState
5454
from .settings import Settings
5555
from .enums import SettingsScope
56+
import json
5657

5758
_WARNING_REGEX = re.compile(r'^\S+:\d+: \w+Warning: ')
5859

@@ -1214,7 +1215,10 @@ def _get_python_environment(self, using_bundled_python: bool=False) -> Optional[
12141215

12151216
def _install_modules(self, ctx, _modules: bytes) -> bool:
12161217
# This callback should not be called directly
1217-
modules = _modules.decode("utf-8")
1218+
dependencies_json = json.loads(_modules.decode("utf-8"))
1219+
modules = ""
1220+
if "pip" in dependencies_json:
1221+
modules = dependencies_json["pip"]
12181222
if len(modules.strip()) == 0:
12191223
return True
12201224
python_lib = settings.Settings().get_string("python.interpreter")

0 commit comments

Comments
 (0)