mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
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.
This commit is contained in:
parent
9820dac4a6
commit
55b2392a1d
4 changed files with 12 additions and 5 deletions
|
@ -35,7 +35,7 @@ class VersionUpgrade25to26(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
|
||||
|
||||
## Upgrades the preferences file from version 2.5 to 2.6.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue