diff options
author | Nicolas Hennion <nicolas@nicolargo.com> | 2014-07-02 14:31:58 +0200 |
---|---|---|
committer | Nicolas Hennion <nicolas@nicolargo.com> | 2014-07-02 14:31:58 +0200 |
commit | 87eb21afe169dbb8ba46d2334ac1bdf39af2b863 (patch) | |
tree | 2394b95e02e3d3313697001a873085d827c49d4b | |
parent | 8bb7523b94e1590f48de3d0136dae75d35890390 (diff) | |
parent | fcebf00f8160464977a5ca3a200a647f9e686e2f (diff) |
Merge branch 'hotfix/issue392'
-rw-r--r-- | glances/outputs/glances_curses.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index 34355e3e..253e2eb2 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -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"): |