Support mulitple bundled_packages JSON files

CURA-5718
This commit is contained in:
Lipu Fei 2018-09-18 15:53:55 +02:00
parent 9924e3e26c
commit a33ce8178a
2 changed files with 2 additions and 2 deletions

View file

@ -306,8 +306,8 @@ class Toolbox(QObject, Extension):
all_packages = self._package_manager.getAllInstalledPackagesInfo() all_packages = self._package_manager.getAllInstalledPackagesInfo()
if "plugin" in all_packages: if "plugin" in all_packages:
# For old plugins, we only want to include the old custom plugin that were installed via the old toolbox. # For old plugins, we only want to include the old custom plugin that were installed via the old toolbox.
# The bundled plugins will be included in the "bundled_packages.json", so the bundled plugins should be # The bundled plugins will be included in JSON files in the "bundled_packages" folder, so the bundled
# excluded from the old plugins list/dict. # plugins should be excluded from the old plugins list/dict.
all_plugin_package_ids = set(package["package_id"] for package in all_packages["plugin"]) all_plugin_package_ids = set(package["package_id"] for package in all_packages["plugin"])
self._old_plugin_ids = set(plugin_id for plugin_id in self._old_plugin_ids self._old_plugin_ids = set(plugin_id for plugin_id in self._old_plugin_ids
if plugin_id not in all_plugin_package_ids) if plugin_id not in all_plugin_package_ids)