Skip to content

Commit 68907ec

Browse files
authored
SG-40476 Fixup regression with current tk-core version (#53)
* Fixup regression with current tk-core version
1 parent f6d0f53 commit 68907ec

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

python/setup_project/config_location_page.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ def initializePage(self):
124124
default_locations = (
125125
self.wizard().core_wizard.get_default_configuration_location()
126126
)
127-
self.wizard().ui.linux_path.setText(default_locations["linux2"])
127+
self.wizard().ui.linux_path.setText(
128+
# Retro compatibility with tk-core < v0.22.6
129+
# TODO: Remove this once we no longer support tk-core < v0.22.6
130+
default_locations["linux2"]
131+
if "linux2" in default_locations
132+
else default_locations["linux"]
133+
)
128134
self.wizard().ui.windows_path.setText(default_locations["win32"])
129135
self.wizard().ui.mac_path.setText(default_locations["darwin"])
130136
except Exception as e:

python/setup_project/project_name_page.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ def on_name_changed(self, name):
5656
# update where the project folders will be for the given name
5757
project_paths_dict = wiz.core_wizard.preview_project_paths(name)
5858

59+
# Retro compatibility with tk-core >= v0.22.6
60+
for storage in project_paths_dict:
61+
if "linux2" not in project_paths_dict[storage]:
62+
project_paths_dict[storage]["linux2"] = project_paths_dict[storage][
63+
"linux"
64+
]
65+
5966
# create path widgets if needed
6067
if not self._storage_path_widgets:
6168
self._setup_storage_widgets(project_paths_dict)

0 commit comments

Comments
 (0)