Merge pull request #217 from chr15m/fix-cron-on-py3.5

Fix cron regex matching on py3.5
pull/224/head
Rui Carmo 2021-11-30 13:46:14 +00:00 zatwierdzone przez GitHub
commit 7263a9c4ad
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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: