File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ def main():
234
234
235
235
for name in args .platforms :
236
236
if name not in analysis_toml ["platform" ].keys ():
237
- raise RuntimeError (
237
+ raise KeyError (
238
238
f"Platform { name } requested on the command line "
239
239
+ "does not exist in the configuration file." ,
240
240
)
@@ -291,11 +291,17 @@ def main():
291
291
292
292
# Print clustering report
293
293
if report_enabled ("clustering" ):
294
- if config_file is None :
295
- platform_names = [p [0 ] for p in args .platforms ]
296
- output_prefix = "-" .join (platform_names )
297
- else :
294
+ # Legacy behavior: guess prefix from YAML filename
295
+ if config_file is not None :
298
296
output_prefix = os .path .realpath (guess_project_name (config_file ))
297
+
298
+ # Modern behavior: append platforms to TOML filename
299
+ else :
300
+ basename = os .path .basename (args .analysis_file )
301
+ filename = os .path .splitext (basename )[0 ]
302
+ platform_names = [p for p in codebase ["platforms" ]]
303
+ output_prefix = "-" .join ([filename ] + platform_names )
304
+
299
305
clustering_output_name = output_prefix + "-dendrogram.png"
300
306
clustering = report .clustering (clustering_output_name , setmap )
301
307
if clustering is not None :
You can’t perform that action at this time.
0 commit comments