mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Removed upgrader for instance containers
CURA-8810_version_upgrade
This commit is contained in:
parent
5885c5afee
commit
33e345d1bc
2 changed files with 1 additions and 39 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2020 Ultimaker B.V.
|
||||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import configparser
|
||||
|
@ -36,24 +36,6 @@ class VersionUpgrade48to49(VersionUpgrade):
|
|||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
|
||||
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||
"""
|
||||
Upgrades instance containers to have the new version number.
|
||||
:param serialized: The original contents of the instance container.
|
||||
:param filename: The original file name of the instance container.
|
||||
:return: A list of new file names, and a list of the new contents for
|
||||
those files.
|
||||
"""
|
||||
parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ())
|
||||
parser.read_string(serialized)
|
||||
|
||||
# Update version number.
|
||||
parser["metadata"]["setting_version"] = "17"
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
|
||||
def upgradeStack(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||
"""
|
||||
Upgrades stacks to have the new version number.
|
||||
|
|
|
@ -17,11 +17,7 @@ def getMetaData() -> Dict[str, Any]:
|
|||
("preferences", 6000016): ("preferences", 6000017, upgrade.upgradePreferences),
|
||||
("machine_stack", 4000016): ("machine_stack", 4000017, upgrade.upgradeStack),
|
||||
("extruder_train", 4000016): ("extruder_train", 4000017, upgrade.upgradeStack),
|
||||
("definition_changes", 4000016): ("definition_changes", 4000017, upgrade.upgradeInstanceContainer),
|
||||
("quality_changes", 4000016): ("quality_changes", 4000017, upgrade.upgradeInstanceContainer),
|
||||
("quality", 4000016): ("quality", 4000017, upgrade.upgradeInstanceContainer),
|
||||
("setting_visibility", 1000000): ("setting_visibility", 2000017, upgrade.upgradeSettingVisibility),
|
||||
("user", 4000016): ("user", 4000017, upgrade.upgradeInstanceContainer),
|
||||
},
|
||||
"sources": {
|
||||
"preferences": {
|
||||
|
@ -36,25 +32,9 @@ def getMetaData() -> Dict[str, Any]:
|
|||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./extruders"}
|
||||
},
|
||||
"definition_changes": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./definition_changes"}
|
||||
},
|
||||
"quality_changes": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./quality_changes"}
|
||||
},
|
||||
"quality": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./quality"}
|
||||
},
|
||||
"setting_visibility": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./setting_visibility"}
|
||||
},
|
||||
"user": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./user"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue