Add except for issue #392

This commit is contained in:
Nicolas Hennion 2014-07-02 14:31:29 +02:00
parent 8bb7523b94
commit fcebf00f81

View File

@ -248,9 +248,15 @@ class GlancesCurses(object):
def end(self):
"""Shutdown the curses window."""
curses.echo()
curses.nocbreak()
curses.curs_set(1)
if hasattr(curses, 'echo'):
curses.echo()
if hasattr(curses, 'nocbreak'):
curses.nocbreak()
if hasattr(curses, 'curs_set'):
try:
curses.curs_set(1)
except Exception:
pass
curses.endwin()
def display(self, stats, cs_status="None"):