mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
CURA-5296 fix first startup not loading bundled packages
This commit is contained in:
parent
7ac7f91d5d
commit
45fc8480a1
1 changed files with 7 additions and 5 deletions
|
@ -54,9 +54,16 @@ class CuraPackageManager(QObject):
|
||||||
|
|
||||||
# (for initialize) Loads the package management file if exists
|
# (for initialize) Loads the package management file if exists
|
||||||
def _loadManagementData(self) -> None:
|
def _loadManagementData(self) -> None:
|
||||||
|
# The bundles package management file should always be there
|
||||||
if not os.path.exists(self._bundled_package_management_file_path):
|
if not os.path.exists(self._bundled_package_management_file_path):
|
||||||
Logger.log("w", "Bundled package management file could not be found!")
|
Logger.log("w", "Bundled package management file could not be found!")
|
||||||
return
|
return
|
||||||
|
# Load the bundled packages:
|
||||||
|
with open(self._bundled_package_management_file_path, "r", encoding = "utf-8") as f:
|
||||||
|
self._bundled_package_dict = json.load(f, encoding = "utf-8")
|
||||||
|
Logger.log("i", "Loaded bundled packages data from %s", self._bundled_package_management_file_path)
|
||||||
|
|
||||||
|
# Load the user package management file
|
||||||
if not os.path.exists(self._user_package_management_file_path):
|
if not os.path.exists(self._user_package_management_file_path):
|
||||||
Logger.log("i", "User package management file %s doesn't exist, do nothing", self._user_package_management_file_path)
|
Logger.log("i", "User package management file %s doesn't exist, do nothing", self._user_package_management_file_path)
|
||||||
return
|
return
|
||||||
|
@ -65,11 +72,6 @@ class CuraPackageManager(QObject):
|
||||||
container_registry = self._application.getContainerRegistry()
|
container_registry = self._application.getContainerRegistry()
|
||||||
with container_registry.lockFile():
|
with container_registry.lockFile():
|
||||||
|
|
||||||
# Load the bundled packages:
|
|
||||||
with open(self._bundled_package_management_file_path, "r", encoding = "utf-8") as f:
|
|
||||||
self._bundled_package_dict = json.load(f, encoding = "utf-8")
|
|
||||||
Logger.log("i", "Loaded bundled packages data from %s", self._bundled_package_management_file_path)
|
|
||||||
|
|
||||||
# Load the user packages:
|
# Load the user packages:
|
||||||
with open(self._user_package_management_file_path, "r", encoding="utf-8") as f:
|
with open(self._user_package_management_file_path, "r", encoding="utf-8") as f:
|
||||||
management_dict = json.load(f, encoding="utf-8")
|
management_dict = json.load(f, encoding="utf-8")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue