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>2020-04-22 12:30:35 +0300
committerJaime van Kessel <nallath@gmail.com>2020-04-22 12:30:35 +0300
commitde7e3f824d301bce00f049b761e27303b2756a37 (patch)
tree6fa940a0bf91ca5fa4e35bbe924f6ca1bfc1d7dd /plugins/VersionUpgrade/VersionUpgrade45to46
parentad6f837f44748f9740bc00341e0810fddb1f113f (diff)
Move the getCfgVersion to base version upgrade
They can still be overridden, but in the current situation they were all the same...
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade45to46')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py b/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py
index 2234dd35f5..f62264c3e7 100644
--- a/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py
+++ b/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py
@@ -10,14 +10,8 @@ _removed_settings = {
"machine_filament_park_distance",
}
-class VersionUpgrade45to46(VersionUpgrade):
- 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
+class VersionUpgrade45to46(VersionUpgrade):
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""
Upgrades preferences to have the new version number.