diff options
author | Konstantinos Karmas <konskarm@gmail.com> | 2020-07-28 10:57:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 10:57:10 +0300 |
commit | 7bf1af99a58f06181a71292b191a818db3584d06 (patch) | |
tree | e80b8ec5990f676d6419d91a82e51b10bd526826 /plugins/VersionUpgrade | |
parent | d6a2c1d46d76d90d9e24c93959761394572df81f (diff) |
CURA-7608 Ignore machine network information when handling project files (#8116)
CURA-7608
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py index 93edab4d58..d3aefa2733 100644 --- a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py +++ b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py @@ -25,6 +25,18 @@ _removed_settings = { "support_tree_enable" } # type: Set[str] +_removed_machine_network_metadata = { + "um_cloud_cluster_id", + "um_network_key", + "um_linked_to_account", + "host_guid", + "removal_warning", + "group_name", + "group_size", + "connection_type" +} # type: Set[str] + + class VersionUpgrade462to47(VersionUpgrade): def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]: """ @@ -136,6 +148,11 @@ class VersionUpgrade462to47(VersionUpgrade): parser["metadata"] = {} parser["metadata"]["setting_version"] = "15" + # Remove machine network information from project file + for network_info in _removed_machine_network_metadata: + if network_info in parser["metadata"]: + del parser["metadata"][network_info] + # Update Pause at Height script parameters if present. if "post_processing_scripts" in parser["metadata"]: new_scripts_entries = [] |