diff options
author | Ghostkeeper <rubend@tutanota.com> | 2017-05-12 15:54:33 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2017-05-12 15:55:19 +0300 |
commit | 55b2392a1d2ca282d2ecf27cff95abe9a6887a79 (patch) | |
tree | 408b02897066535cd3272ef539011522e3bc1217 /plugins/VersionUpgrade/VersionUpgrade21to22 | |
parent | 9820dac4a6f0dbe942cbd66e8e13536361af68d0 (diff) |
Load setting version from metadata
I'm not really awake today, am I? The functionality happened to still work because of how our real data is structured right now, but the tests still failed. Those are successful now.
Contributes to issue CURA-3427.
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade21to22')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py index 0785efa875..055d28b3ab 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import configparser #To get version numbers from config files. @@ -250,7 +250,7 @@ class VersionUpgrade21to22(VersionUpgrade): parser = configparser.ConfigParser(interpolation = None) parser.read_string(serialised) format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised. - setting_version = int(parser.get("general", "setting_version", fallback = 0)) + setting_version = int(parser.get("metadata", "setting_version", fallback = 0)) return format_version * 1000000 + setting_version ## Gets the fallback quality to use for a specific machine-variant-material |