diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-03-17 15:00:13 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-03-17 15:00:13 +0100 |
commit | c5e70b7ccfb01c7432d36a1266d8b3f23404e2a2 (patch) | |
tree | 887e57a2b28b3c447c6e1da986902b545f7e99b2 | |
parent | 2592077eaab7ef4ca0549d39acf9707458795d40 (diff) |
Correct one of the issue of #1822 (get_bool_value error)
-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): |