When the list contains just one item, and this is moved to the archive, the application crashes.
test: create new file, add one task, press x, press X, Crash.
Traceback (most recent call last):
File "/usr/bin/todotxt-machine", line 11, in <module>
load_entry_point('todotxt-machine==2.2.2', 'console_scripts', 'todotxt-machine')()
File "/usr/lib/python3.6/site-packages/todotxt_machine/cli.py", line 179, in main
show_filter_panel)
File "/usr/lib/python3.6/site-packages/todotxt_machine/urwid_ui.py", line 992, in main
self.loop.run()
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run
self._run()
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 376, in _run
self.event_loop.run()
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 682, in run
self._loop()
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 719, in _loop
self._watch_files[fd]()
File "/usr/lib/python3.6/site-packages/urwid/raw_display.py", line 393, in <lambda>
event_loop, callback, self.get_available_raw_input())
File "/usr/lib/python3.6/site-packages/urwid/raw_display.py", line 493, in parse_input
callback(processed, processed_codes)
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 403, in _update
self.process_input(keys)
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 509, in process_input
something_handled |= bool(self.unhandled_input(k))
File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 555, in unhandled_input
return self._unhandled_input(input)
File "/usr/lib/python3.6/site-packages/todotxt_machine/urwid_ui.py", line 536, in keystroke
self.archive_done_todos()
File "/usr/lib/python3.6/site-packages/todotxt_machine/urwid_ui.py", line 452, in archive_done_todos
self.move_selection_top()
File "/usr/lib/python3.6/site-packages/todotxt_machine/urwid_ui.py", line 355, in move_selection_top
self.listbox.set_focus(0)
File "/usr/lib/python3.6/site-packages/urwid/listbox.py", line 562, in set_focus
raise IndexError("Can't set focus, ListBox is empty")
IndexError: Can't set focus, ListBox is empty
^CException ignored in: <module 'threading' from '/usr/lib/python3.6/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 1294, in _shutdown
t.join()
File "/usr/lib/python3.6/threading.py", line 1056, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
When the list contains just one item, and this is moved to the archive, the application crashes.
test: create new file, add one task, press x, press X, Crash.