Fix cron regex matching on py3.5

pull/217/head
Chris McCormick 2021-11-30 21:35:45 +08:00
rodzic f6e8aca5a3
commit 60123c4abe
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -261,10 +261,10 @@ def parse_procfile(filename):
# Check for cron patterns
if kind == "cron":
limits = [59, 24, 31, 12, 7]
matches = match(CRON_REGEXP, command)
matches = match(CRON_REGEXP, command).groups()
if matches:
for i in range(len(limits)):
if int(matches[i + 1].replace("*/", "").replace("*", "1")) > limits[i]:
if int(matches[i].replace("*/", "").replace("*", "1")) > limits[i]:
raise ValueError
workers[kind] = command
except Exception: