Refactor app_data -> app_name

This commit is contained in:
Roy Nieterau 2023-03-17 16:21:27 +01:00
parent bec4639985
commit 00b83e5879
2 changed files with 6 additions and 6 deletions

View file

@ -17,11 +17,11 @@ FUSION_VERSIONS_DICT = {
}
def get_fusion_version(app_data):
def get_fusion_version(app_name):
"""
The function is triggered by the prelaunch hooks to get the fusion version.
`app_data` is obtained by prelaunch hooks from the
`app_name` is obtained by prelaunch hooks from the
`launch_context.env.get("AVALON_APP_NAME")`.
To get a correct Fusion version, a version number should be present
@ -31,10 +31,10 @@ def get_fusion_version(app_data):
log = Logger.get_logger(__name__)
if not app_data:
if not app_name:
return
app_version_candidates = re.findall(r"\d+", app_data)
app_version_candidates = re.findall(r"\d+", app_name)
if not app_version_candidates:
return
for app_version in app_version_candidates:

View file

@ -125,8 +125,8 @@ class FusionCopyPrefsPrelaunch(PreLaunchHook):
) = self.get_copy_fusion_prefs_settings()
# Get launched application context and return correct app version
app_data = self.launch_context.env.get("AVALON_APP_NAME")
app_version = get_fusion_version(app_data)
app_name = self.launch_context.env.get("AVALON_APP_NAME")
app_version = get_fusion_version(app_name)
_, profile_version = FUSION_VERSIONS_DICT[app_version]
fu_profile = self.get_fusion_profile_name(profile_version)