In version 3.1.2 i get this errors if there are only two IDs:
[dramon@centos7 ~]$ todo edit
Traceback (most recent call last):
File "/usr/local/bin/todo", line 9, in <module>
load_entry_point('todocli==3.1.2', 'console_scripts', 'todo')()
File "/usr/local/lib/python3.6/site-packages/todo/todo.py", line 156, in main
result = dispatch(args, daccess)
File "/usr/local/lib/python3.6/site-packages/todo/todo.py", line 530, in dispatch
return handler(args, daccess)
File "/usr/local/lib/python3.6/site-packages/todo/todo.py", line 361, in edit_task
tid = args['<id>'][0]
IndexError: list index out of range
[dramon@centos7 ~]$ todo edit 5
Traceback (most recent call last):
File "/usr/local/bin/todo", line 9, in <module>
load_entry_point('todocli==3.1.2', 'console_scripts', 'todo')()
File "/usr/local/lib/python3.6/site-packages/todo/todo.py", line 156, in main
result = dispatch(args, daccess)
File "/usr/local/lib/python3.6/site-packages/todo/todo.py", line 530, in dispatch
return handler(args, daccess)
File "/usr/local/lib/python3.6/site-packages/todo/todo.py", line 363, in edit_task
new_content = utils.input_from_editor(task['title'], EDITOR)
TypeError: 'NoneType' object is not subscriptable
In version 3.1.2 i get this errors if there are only two IDs:
I suggest to check if ID is present and valid :)