survive empty prefs entry

This commit is contained in:
Yorick van Pelt 2024-04-15 10:25:08 +02:00
parent 7c0ccaf0b6
commit 11587863d2
No known key found for this signature in database
GPG Key ID: D8D3CC6D951384DE
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ def make_task_lut(tasks: dict[str, TaskConfig]):
task_lut[lookup] |= {t.lower()}
task_re = re.compile(config['task_re'])
def lookup_tasks(tasks):
return set.union(*(task_lut[x.strip()] for x in task_re.split(tasks) if x not in config['ignore']))
return set.union(set(), *(task_lut[x.strip()] for x in task_re.split(tasks) if x not in config['ignore']))
return lookup_tasks
def read_prefs(pref_file, tasks, people):
lookup_tasks = make_task_lut(tasks)