sort time units

This commit is contained in:
Alexandre Detiste 2014-09-04 14:23:18 +02:00
parent 6e01a64709
commit 73df3950bd

View File

@ -134,8 +134,8 @@ def parse_crontab(filename, withuser=True, monotonic=False):
def parse_time_unit(value, values, mapping=int):
if value == '*':
return ['*']
return list(reduce(lambda a, i: a.union(set(i)), map(values.__getitem__,
map(parse_period(mapping), value.split(','))), set()))
return sorted(list(reduce(lambda a, i: a.union(set(i)), map(values.__getitem__,
map(parse_period(mapping), value.split(','))), set())))
def month_map(month):
try: