Print the titles at specific locations
commit2afaaf25690cb5eb8cb527be0de030d3c796e991
authorPaul Wise <pabs3@bonedaddy.net>
Thu, 4 Aug 2016 09:28:57 +0000 (4 17:28 +0800)
committerPaul Wise <pabs3@bonedaddy.net>
Thu, 4 Aug 2016 09:29:39 +0000 (4 17:29 +0800)
treee93f41af7e3ab4abbe89dfae61438d4671297caf
parentc8cc7ef97be1bd8854eb9c5c627e61cc0752674f
Print the titles at specific locations

Prevents a crash in a 3-line terminal:

Traceback (most recent call last):
  File "./iotop.py", line 12, in <module>
    main()
  File "./iotop/ui.py", line 652, in main
    main_loop()
  File "./iotop/ui.py", line 642, in <lambda>
    main_loop = lambda: run_iotop(options)
  File "./iotop/ui.py", line 537, in run_iotop
    return curses.wrapper(run_iotop_window, options)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "./iotop/ui.py", line 529, in run_iotop_window
    ui.run()
  File "./iotop/ui.py", line 176, in run
    self.process_list.duration)
  File "./iotop/ui.py", line 492, in refresh_display
    self.win.addstr(title, attr)
_curses.error: addstr() returned ERR
iotop/ui.py