diff options
-rw-r--r-- | glances/plugins/glances_diskio.py | 7 | ||||
-rw-r--r-- | glances/plugins/glances_network.py | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/glances/plugins/glances_diskio.py b/glances/plugins/glances_diskio.py index 952fa870..2cb85e2a 100644 --- a/glances/plugins/glances_diskio.py +++ b/glances/plugins/glances_diskio.py @@ -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 - self.hide_zero = config.get_bool_value( - self.plugin_name + 'XXX', 'hide_zero', default=False) + 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 = ['read_bytes', 'write_bytes'] def get_key(self): diff --git a/glances/plugins/glances_network.py b/glances/plugins/glances_network.py index 75e77c9d..15e9892d 100644 --- a/glances/plugins/glances_network.py +++ b/glances/plugins/glances_network.py @@ -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 - self.hide_zero = config.get_bool_value( - self.plugin_name, 'hide_zero', default=False) + 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): |