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:
authorJaime van Kessel <nallath@gmail.com>2019-07-16 15:31:38 +0300
committerJaime van Kessel <nallath@gmail.com>2019-07-16 15:31:38 +0300
commit2ca39c8e7f7162cdae229010b7948b80c4fa82cf (patch)
tree60d04577d7d37d50127c542e64b18c9fa77b63fe /plugins/CuraProfileReader
parent6bb3e33c9e0ad50e8e647ebeff6f8bfa39d4fec9 (diff)
Don't reparse entire file when checking for already extracted version
CURA-6659
Diffstat (limited to 'plugins/CuraProfileReader')
-rw-r--r--plugins/CuraProfileReader/CuraProfileReader.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py
index 095c42319b..6394c1c385 100644
--- a/plugins/CuraProfileReader/CuraProfileReader.py
+++ b/plugins/CuraProfileReader/CuraProfileReader.py
@@ -8,6 +8,7 @@ from UM.PluginRegistry import PluginRegistry
from UM.Logger import Logger
from UM.Settings.ContainerFormatError import ContainerFormatError
from UM.Settings.InstanceContainer import InstanceContainer # The new profile to make.
+from cura.CuraApplication import CuraApplication
from cura.ReaderWriters.ProfileReader import ProfileReader
import zipfile
@@ -111,9 +112,10 @@ class CuraProfileReader(ProfileReader):
if "general" not in parser:
Logger.log("w", "Missing required section 'general'.")
return []
- if "version" not in parser["general"]:
- Logger.log("w", "Missing required 'version' property")
- return []
+
+ new_source_version = results.version
+ if int(new_source_version / 1000000) != InstanceContainer.Version or new_source_version % 1000000 != CuraApplication.SettingVersion:
+ Logger.log("e", "Failed to upgrade profile [%s]", profile_id)
if int(parser["general"]["version"]) != InstanceContainer.Version:
Logger.log("e", "Failed to upgrade profile [%s]", profile_id)