diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-06-24 12:32:43 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-06-24 12:32:43 +0300 |
commit | 0a0b4821efe6702f16e0327bf39039f1b162c2e9 (patch) | |
tree | 4eb7011e4b016589b123e6e81aeee8f048e68cd9 /plugins/CuraProfileReader | |
parent | 6273d34eaede3207fdb7a16b15513dd1f399629b (diff) |
Added logging for cases where the upgrade of the profile failed
CURA-6592
Diffstat (limited to 'plugins/CuraProfileReader')
-rw-r--r-- | plugins/CuraProfileReader/CuraProfileReader.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py index eae672c11e..de0e97c806 100644 --- a/plugins/CuraProfileReader/CuraProfileReader.py +++ b/plugins/CuraProfileReader/CuraProfileReader.py @@ -32,7 +32,7 @@ class CuraProfileReader(ProfileReader): def read(self, file_name: str) -> List[Optional[InstanceContainer]]: try: with zipfile.ZipFile(file_name, "r") as archive: - results = [] #type: List[Optional[InstanceContainer]] + results = [] # type: List[Optional[InstanceContainer]] for profile_id in archive.namelist(): with archive.open(profile_id) as f: serialized = f.read() @@ -107,9 +107,11 @@ class CuraProfileReader(ProfileReader): if source_format in plugin["version_upgrade"] and plugin["version_upgrade"][source_format][1] == InstanceContainer.Version] if not profile_convert_funcs: + Logger.log("w", "Unable to find an upgrade path for the profile [%s]", profile_id) return [] filenames, outputs = profile_convert_funcs[0](serialized, profile_id) if filenames is None and outputs is None: + Logger.log("w", "The conversion failed to return any usable data for [%s]", profile_id) return [] return list(zip(outputs, filenames)) |