From 63703e39ce42a2f6bc679ac3e4626a0c18d6c895 Mon Sep 17 00:00:00 2001 From: Michael Delva Date: Thu, 19 Mar 2026 21:05:38 +0100 Subject: [PATCH 1/2] Don't throw an exception when there's no property Project:BuildgraphSharedProperties in the config.ini file --- src/uepyscripts/run/buildgraph.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/uepyscripts/run/buildgraph.py b/src/uepyscripts/run/buildgraph.py index 216aa2e..7dd981d 100644 --- a/src/uepyscripts/run/buildgraph.py +++ b/src/uepyscripts/run/buildgraph.py @@ -30,7 +30,7 @@ def run(target: str, arguments: list[str]) -> int: uat_arguments.append(f"-Project={project.uproject_path}") - automation_scripts_directories = config["Project"]["AutomationScriptsDirectories"] + automation_scripts_directories = config["Project"].get("AutomationScriptsDirectories") if automation_scripts_directories == "" or automation_scripts_directories is None: logger.info("No automation scripts directory is set") else: @@ -46,11 +46,15 @@ def run(target: str, arguments: list[str]) -> int: logger.info(f"Automation Scripts directory set to {automation_scripts_path}") uat_arguments.append(f"-ScriptDir={automation_scripts_path}") - shared_properties = dict(pair.split("=") for pair in config["Project"]["BuildgraphSharedProperties"].split("+")) + shared_properties_str = config["Project"].get("BuildgraphSharedProperties", "") + if shared_properties_str == "" or shared_properties_str is None: + logger.info("No shared properties to set") + else: + shared_properties = dict(pair.split("=") for pair in shared_properties_str.split("+")) if shared_properties_str else {} - if shared_properties is not None: - for key, value in shared_properties.items(): - uat_arguments.append(f"-set:{key}={value}") + if shared_properties is not None: + for key, value in shared_properties.items(): + uat_arguments.append(f"-set:{key}={value}") for arg in arguments: uat_arguments.append(arg) From 761a06ec3fbe20259a9fc9b2d970a82f3f9c1c7d Mon Sep 17 00:00:00 2001 From: Michael Delva Date: Thu, 19 Mar 2026 21:06:45 +0100 Subject: [PATCH 2/2] Added towncrier change file --- .changelog/19.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .changelog/19.fixed.md diff --git a/.changelog/19.fixed.md b/.changelog/19.fixed.md new file mode 100644 index 0000000..ca0f019 --- /dev/null +++ b/.changelog/19.fixed.md @@ -0,0 +1 @@ +Don't throw an exception when there's no property Project:BuildgraphSharedProperties in the config.ini file