chore: more sanity check
All checks were successful
build / trigger-build-image (push) Successful in 11s
All checks were successful
build / trigger-build-image (push) Successful in 11s
This commit is contained in:
parent
4ae1907ad2
commit
8e3e61c37b
|
@ -366,7 +366,11 @@ class Teapot:
|
|||
time_windows = []
|
||||
valid_items = []
|
||||
for item in items:
|
||||
if "=" not in item:
|
||||
continue
|
||||
name, values = item.split("=")
|
||||
if ":" not in values:
|
||||
continue
|
||||
max_count, time_period = map(int, values.split(":"))
|
||||
if max_count < 0 or time_period < 0:
|
||||
continue
|
||||
|
|
|
@ -291,7 +291,7 @@ def get_title_prefix(
|
|||
def parse_penalty_config(penalty_config: str) -> List[Tuple[float, float]]:
|
||||
res = []
|
||||
for penalty in penalty_config.split(","):
|
||||
if not penalty.strip():
|
||||
if "=" not in penalty:
|
||||
continue
|
||||
hour, factor = map(float, penalty.split("="))
|
||||
res.append((hour, factor))
|
||||
|
|
Loading…
Reference in New Issue
Block a user