mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-06 09:20:27 +00:00
validate hours to not be greater than 23, #209
This commit is contained in:
parent
b1a7a6a148
commit
6a1cb15114
@ -220,6 +220,10 @@ class ScheduleBuilder:
|
||||
raise ValueError("invalid input")
|
||||
|
||||
to_write = dict(zip(keys, values))
|
||||
all_hours = [int(i) for i in re.split(r"\D+", to_write["hour"])]
|
||||
if max(all_hours) > 23:
|
||||
print("hour can't be greater than 23")
|
||||
raise ValueError("invalid input")
|
||||
try:
|
||||
int(to_write["minute"])
|
||||
except ValueError as error:
|
||||
|
Loading…
Reference in New Issue
Block a user