Nic0/tyrs — Issue #117: tyrs crashed by pressing 'i'
Author: jeff84
Created: 2012-01-11 10:01:22+00:00
State: open

When I press the key 'i', tyrs will crash with:

Traceback (most recent call last):
File "/usr/bin/tyrs", line 16, in
main()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 66, in main
init_tyrs()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 71, in init_tyrs
init_interface()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 88, in init_interface
user_interface = Interface()
File "/usr/lib/python2.7/site-packages/tyrs/interface.py", line 49, in __init__
self.main_loop()
File "/usr/lib/python2.7/site-packages/tyrs/interface.py", line 62, in main_loop
self.loop.run()
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 237, in run_wrapper
return fn()
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 307, in _run
self.event_loop.run()
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 682, in run
self._loop()
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 720, in _loop
self._watch_files[fd]()
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 358, in _update
self.process_input(keys)
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 453, in process_input
something_handled |= bool(self.unhandled_input(k))
File "/usr/lib/python2.7/site-packages/urwid/main_loop.py", line 488, in unhandled_input
return self._unhandled_input(input)
File "/usr/lib/python2.7/site-packages/tyrs/keys.py", line 129, in keystroke
self.interface.current_user_info()
File "/usr/lib/python2.7/site-packages/tyrs/interface.py", line 190, in current_user_info
User(self.current_status().user)
File "/usr/lib/python2.7/site-packages/tyrs/user.py", line 26, in __init__
self._init_screen()
File "/usr/lib/python2.7/site-packages/tyrs/user.py", line 34, in _init_screen
maxyx = self.interface.screen.getmaxyx()
AttributeError: 'Interface' object has no attribute 'screen'