kopia lustrzana https://github.com/piku/piku
Fix cron regex matching on py3.5
rodzic
f6e8aca5a3
commit
60123c4abe
4
piku.py
4
piku.py
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue