Fix links to upgrade functions

These are bound methods of an instance.

Contributes to issue CURA-844.
This commit is contained in:
Ghostkeeper 2016-06-23 12:42:27 +02:00
parent 5143d0b9f1
commit 68afd08afd

View File

@ -6,6 +6,8 @@ from . import VersionUpgrade21to22
from UM.i18n import i18nCatalog from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura") catalog = i18nCatalog("cura")
upgrade = VersionUpgrade21to22.VersionUpgrade21to22()
def getMetaData(): def getMetaData():
return { return {
"plugin": { "plugin": {
@ -17,25 +19,25 @@ def getMetaData():
}, },
"version_upgrade": { "version_upgrade": {
# From To Upgrade function # From To Upgrade function
("profile", 1): ("instance_container", 2, VersionUpgrade21to22.upgradeProfile), ("profile", 1): ("instance_container", 2, upgrade.upgradeProfile),
("machine_instance", 1): ("container_stack", 2, VersionUpgrade21to22.upgradeMachineInstance), ("machine_instance", 1): ("container_stack", 2, upgrade.upgradeMachineInstance),
("preferences", 1): ("preferences", 2, VersionUpgrade21to22.upgradePreferences) ("preferences", 1): ("preferences", 2, upgrade.upgradePreferences)
}, },
"sources": { "sources": {
"profile": { "profile": {
"get_version": VersionUpgrade21to22.getCfgVersion, "get_version": upgrade.getCfgVersion,
"location": {"./profiles"} "location": {"./profiles"}
}, },
"machine_instance": { "machine_instance": {
"get_version": VersionUpgrade21to22.getCfgVersion, "get_version": upgrade.getCfgVersion,
"location": {"./machine_instances"} "location": {"./machine_instances"}
}, },
"preferences": { "preferences": {
"get_version": VersionUpgrade21to22.getCfgVersion, "get_version": upgrade.getCfgVersion,
"location": {"."} "location": {"."}
} }
} }
} }
def register(app): def register(app):
return { "version_upgrade": VersionUpgrade21to22.VersionUpgrade21to22() } return { "version_upgrade": upgrade }