Exit on see none existing project
This commit is contained in:
@@ -172,6 +172,10 @@ def view_project_set_active(project_id, act_task_id, conn):
|
||||
cursor = conn.cursor()
|
||||
cursor.execute(query, (project_id,))
|
||||
row = cursor.fetchone()
|
||||
if not row:
|
||||
print('Could not find project {}'.format(project_id))
|
||||
sys.exit(1)
|
||||
|
||||
print('* {:d}: ({}) {} (status: {}, {} tasks)'.format(*row))
|
||||
|
||||
# FIXME duplicate with list_task
|
||||
@@ -188,6 +192,5 @@ def view_project_set_active(project_id, act_task_id, conn):
|
||||
print(' {} {:d}: ({}) [{}] [{}] {} ({} tasks)'.format('*' if act_task_id == row[0] else ' ',
|
||||
task_id, username, status, priority, message, nb_note))
|
||||
action.create_action(cursor, project_id=project_id)
|
||||
# TODO Unset active task
|
||||
|
||||
# TODO Add a -v option to see notes?
|
||||
Reference in New Issue
Block a user