Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cura/Settings/CuraContainerRegistry.py2
-rw-r--r--plugins/CuraProfileReader/CuraProfileReader.py2
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py2
3 files changed, 5 insertions, 1 deletions
diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py
index 98c37da617..3982418070 100644
--- a/cura/Settings/CuraContainerRegistry.py
+++ b/cura/Settings/CuraContainerRegistry.py
@@ -210,7 +210,7 @@ class CuraContainerRegistry(ContainerRegistry):
return {"status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profile {0}", profile_or_list[0].getName())}
# If it hasn't returned by now, none of the plugins loaded the profile successfully.
- return {"status": "error", "message": catalog.i18nc("@info:status", "Profile {0} has an unknown file type.", file_name)}
+ return {"status": "error", "message": catalog.i18nc("@info:status", "Profile {0} has an unknown file type or is corrupted.", file_name)}
def _configureProfile(self, profile, id_seed, new_name):
profile.setReadOnly(False)
diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py
index d1be5b59a8..2198d73b22 100644
--- a/plugins/CuraProfileReader/CuraProfileReader.py
+++ b/plugins/CuraProfileReader/CuraProfileReader.py
@@ -99,4 +99,6 @@ class CuraProfileReader(ProfileReader):
return []
filenames, outputs = profile_convert_funcs[0](serialized, profile_id)
+ if filenames is None and outputs is None:
+ return []
return list(zip(outputs, filenames))
diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py
index d7d20db071..e55a89faf3 100644
--- a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py
+++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py
@@ -5,6 +5,7 @@ import configparser #To read config files.
import io #To write config files to strings as if they were files.
import UM.VersionUpgrade
+from UM.Logger import Logger
## Creates a new profile instance by parsing a serialised profile in version 1
# of the file format.
@@ -80,6 +81,7 @@ class Profile:
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
if self._name == "Current settings":
+ Logger.log("w", "Unable to upgrade this profile. Skipping it.")
return None, None #Can't upgrade these, because the new current profile needs to specify the definition ID and the old file only had the machine instance, not the definition.
config = configparser.ConfigParser(interpolation = None)