Addon Manager: Optional packages also obey allowlist

This commit is contained in:
Chris Hennes
2022-04-01 11:49:47 -05:00
parent d36c59b3dc
commit b435db807d

View File

@@ -982,7 +982,15 @@ class CommandAddonManager:
try:
__import__(py_dep)
except ImportError:
self.python_optional.append(py_dep)
allowed = False
for dep in python_required:
if dep in self.allowed_packages:
allowed = True
break
if allowed:
self.python_optional.append(py_dep)
else:
FreeCAD.Console.PrintWarning(translate("AddonsInstaller", "Specified optional package {} is not in the allowed packages list").format(py_dep))
self.wbs.sort()
self.external_addons.sort()