From 445a90fb05c313759f3b6b35bca69dfc2bf9775d Mon Sep 17 00:00:00 2001 From: Alex Manuskin Date: Sat, 13 Jun 2020 18:21:37 +0300 Subject: [PATCH] Fix flake8 --- s_tui/s_tui.py | 11 ++++++----- s_tui/sturwid/ui_elements.py | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/s_tui/s_tui.py b/s_tui/s_tui.py index aa25ee7..c3bbbb9 100755 --- a/s_tui/s_tui.py +++ b/s_tui/s_tui.py @@ -248,19 +248,20 @@ def update_displayed_information(self): any(self.summary_menu.active_sensors[source_name])): source.update() - for graph in self.visible_graphs.values(): try: graph.update() - except: - logging.error("Graph update failed") + except IndexError: + logging.debug("Graph update failed") + pass # update graph summery for summary in self.visible_summaries.values(): try: summary.update() - except: - logging.error("Summary update failed") + except IndexError: + logging.debug("Summary update failed") + pass # Only update clock if not is stress mode if self.controller.stress_conroller.get_current_mode() != 'Monitor': diff --git a/s_tui/sturwid/ui_elements.py b/s_tui/sturwid/ui_elements.py index 7181199..b6883dc 100644 --- a/s_tui/sturwid/ui_elements.py +++ b/s_tui/sturwid/ui_elements.py @@ -92,9 +92,9 @@ def keypress(self, size, key): return super(ViListBox, self).keypress(size, key) -def radio_button(g, l, fn): +def radio_button(group, label, fn): """ Inheriting radio button of urwid """ - w = urwid.RadioButton(g, l, False, on_state_change=fn) + w = urwid.RadioButton(group, label, False, on_state_change=fn) w = urwid.AttrWrap(w, 'button normal', 'button select') return w