From 36594b0c046417a6a5f04364ed47b434f4aeceb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Sun, 28 Feb 2016 20:26:11 +0100 Subject: Change behavior projects: Approximative definition is possible now --- todoist | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/todoist b/todoist index cd469c3..8a45c90 100755 --- a/todoist +++ b/todoist @@ -152,11 +152,11 @@ def main(): ## Set project if args.project: - proj = args.project.lower() - if proj in projects: - kwargs["project_id"] = projects[proj] - else: - print("WARNING: Unknown project. Task will be stored in Inbox", file=sys.stderr) + proj, err = find_candidate(args.project.lower(), projects) + if not proj: + print("Set project error:", err, file=sys.stderr) + sys.exit(1) + kwargs["project_id"] = proj ## Set priority/severity if args.severity: -- cgit v1.2.3