fix: empty groups from repo.toml
This commit is contained in:
parent
1633a3035b
commit
965253725d
|
@ -129,8 +129,9 @@ def get_teapot_check_args(repo_conf: repo.Config, task_conf: task.Config) -> Lis
|
||||||
"--scoreboard-filename",
|
"--scoreboard-filename",
|
||||||
task_conf.scoreboard,
|
task_conf.scoreboard,
|
||||||
]
|
]
|
||||||
if repo_conf.groups.name:
|
if repo_conf.groups.name or task_conf.groups.name:
|
||||||
group_str = lambda groups: ",".join(
|
groups = task_conf.groups if task_conf.groups.name else repo_conf.groups
|
||||||
|
group_config = ",".join(
|
||||||
f"{name}={max_count}:{time_period}"
|
f"{name}={max_count}:{time_period}"
|
||||||
for name, max_count, time_period in zip(
|
for name, max_count, time_period in zip(
|
||||||
groups.name,
|
groups.name,
|
||||||
|
@ -138,9 +139,6 @@ def get_teapot_check_args(repo_conf: repo.Config, task_conf: task.Config) -> Lis
|
||||||
groups.time_period_hour,
|
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])
|
res.extend(["--group-config", group_config])
|
||||||
if task_conf.time.begin:
|
if task_conf.time.begin:
|
||||||
res.extend(["--begin-time", task_conf.time.begin.strftime("%Y-%m-%dT%H:%M:%S")])
|
res.extend(["--begin-time", task_conf.time.begin.strftime("%Y-%m-%dT%H:%M:%S")])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user