From 9f8a812081dc30ed17b387f9b47740cfd4272e99 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Tue, 21 Jul 2020 11:26:18 +0200 Subject: Unusual characters in cmdline cause lines to disappear and corrupt the display #1692 --- glances/outputs/glances_curses.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index ff07a642..87764316 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -869,12 +869,16 @@ class _GlancesCurses(object): y = display_y for m in plugin_stats['msgdict']: # New line - if m['msg'].startswith('\n'): - # Go to the next line - y += 1 - # Return to the first column - x = display_x - continue + try: + if m['msg'].startswith('\n'): + # Go to the next line + y += 1 + # Return to the first column + x = display_x + continue + except: + # Avoid exception (see issue #1692) + pass # Do not display outside the screen if x < 0: continue -- cgit v1.2.3