File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ def image_build_config_from_args(args) -> ImageBuildConfiguration:
92
92
raise ValueError (f"Image '{ image } ' is not defined in the build info for scenario '{ build_scenario } '" )
93
93
94
94
# Resolve final values with overrides
95
- # TODO: cover versions for agents and OM images
96
95
version = args .version or image_build_info .version
97
96
registry = args .registry or image_build_info .repository
98
97
platforms = get_platforms_from_arg (args .platform ) or image_build_info .platforms
@@ -113,17 +112,19 @@ def image_build_config_from_args(args) -> ImageBuildConfiguration:
113
112
114
113
115
114
def get_scenario_from_arg (args_scenario : str ) -> BuildScenario | None :
116
- if args_scenario :
117
- try :
118
- return BuildScenario (args_scenario )
119
- except ValueError as e :
120
- raise ValueError (f"Invalid scenario '{ args_scenario } ': { e } " )
115
+ if not args_scenario :
116
+ return None
121
117
122
- return None
118
+ try :
119
+ return BuildScenario (args_scenario )
120
+ except ValueError as e :
121
+ raise ValueError (f"Invalid scenario '{ args_scenario } ': { e } " )
123
122
124
123
125
124
def get_platforms_from_arg (args_platforms : str ) -> list [str ] | None :
126
- """Parse and validate the --platform argument"""
125
+ if not args_platforms :
126
+ return None
127
+
127
128
platforms = [p .strip () for p in args_platforms .split ("," )]
128
129
if any (p not in SUPPORTED_PLATFORMS for p in platforms ):
129
130
raise ValueError (
You can’t perform that action at this time.
0 commit comments