fix (todo): Correctly filter out empty tasks.

This commit is contained in:
2022-09-10 01:42:47 +10:00
parent d7ee675561
commit a7f7dd6e7b

View File

@@ -470,7 +470,8 @@ class Tasklist:
""" """
Process arguments to an `add` request Process arguments to an `add` request
""" """
tasks = [line for line in userstr.splitlines() if line] tasks = (line.strip() for line in userstr.splitlines())
tasks = [task for task in tasks if task]
if not tasks: if not tasks:
# TODO: Maybe have interactive input here # TODO: Maybe have interactive input here
return return