diff options
-rwxr-xr-x | todoist | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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: |