aboutsummaryrefslogtreecommitdiffstats
path: root/todoist
diff options
context:
space:
mode:
Diffstat (limited to 'todoist')
-rwxr-xr-xtodoist10
1 files 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: