mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Move the getCfgVersion to base version upgrade
They can still be overridden, but in the current situation they were all the same...
This commit is contained in:
parent
ad6f837f44
commit
de7e3f824d
15 changed files with 7 additions and 209 deletions
|
@ -122,13 +122,6 @@ class VersionUpgrade44to45(VersionUpgrade):
|
|||
except OSError: # Is a directory, file not found, or insufficient rights.
|
||||
continue
|
||||
|
||||
def getCfgVersion(self, serialised: str) -> int:
|
||||
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("metadata", "setting_version", fallback = "0"))
|
||||
return format_version * 1000000 + setting_version
|
||||
|
||||
## Upgrades Preferences to have the new version number.
|
||||
#
|
||||
# This renames the renamed settings in the list of visible settings.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue