Correct one of the issue of #1822 (get_bool_value error)

pull/1833/head
nicolargo 2021-03-17 15:00:13 +01:00
parent 2592077eaa
commit c5e70b7ccf
2 changed files with 10 additions and 4 deletions

View File

@ -53,8 +53,11 @@ class Plugin(GlancesPlugin):
# We want to display the stat in the curse interface
self.display_curse = True
# Hide stats if it has never been != 0
if config is not None:
self.hide_zero = config.get_bool_value(
self.plugin_name + 'XXX', 'hide_zero', default=False)
self.plugin_name, 'hide_zero', default=False)
else:
self.hide_zero = False
self.hide_zero_fields = ['read_bytes', 'write_bytes']
def get_key(self):

View File

@ -62,8 +62,11 @@ class Plugin(GlancesPlugin):
# We want to display the stat in the curse interface
self.display_curse = True
# Hide stats if it has never been != 0
if config is not None:
self.hide_zero = config.get_bool_value(
self.plugin_name, 'hide_zero', default=False)
else:
self.hide_zero = False
self.hide_zero_fields = ['rx', 'tx']
def get_key(self):