fix: empty groups from repo.toml
All checks were successful
build / build (push) Successful in 2m9s
build / trigger-build-image (push) Successful in 9s

This commit is contained in:
Boming Zhang 2025-10-06 15:36:29 -07:00
parent 1633a3035b
commit 965253725d
No known key found for this signature in database
GPG Key ID: 134DACA8458EB0E3

View File

@ -129,8 +129,9 @@ def get_teapot_check_args(repo_conf: repo.Config, task_conf: task.Config) -> Lis
"--scoreboard-filename",
task_conf.scoreboard,
]
if repo_conf.groups.name:
group_str = lambda groups: ",".join(
if repo_conf.groups.name or task_conf.groups.name:
groups = task_conf.groups if task_conf.groups.name else repo_conf.groups
group_config = ",".join(
f"{name}={max_count}:{time_period}"
for name, max_count, time_period in zip(
groups.name,
@ -138,9 +139,6 @@ def get_teapot_check_args(repo_conf: repo.Config, task_conf: task.Config) -> Lis
groups.time_period_hour,
)
)
group_config = group_str(
task_conf.groups if task_conf.groups.name else repo_conf.groups
)
res.extend(["--group-config", group_config])
if task_conf.time.begin:
res.extend(["--begin-time", task_conf.time.begin.strftime("%Y-%m-%dT%H:%M:%S")])