提交 c5e70b7c 编写于 作者: N nicolargo

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

上级 2592077e
...@@ -53,8 +53,11 @@ class Plugin(GlancesPlugin): ...@@ -53,8 +53,11 @@ class Plugin(GlancesPlugin):
# We want to display the stat in the curse interface # We want to display the stat in the curse interface
self.display_curse = True self.display_curse = True
# Hide stats if it has never been != 0 # Hide stats if it has never been != 0
self.hide_zero = config.get_bool_value( if config is not None:
self.plugin_name + 'XXX', 'hide_zero', default=False) 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'] self.hide_zero_fields = ['read_bytes', 'write_bytes']
def get_key(self): def get_key(self):
......
...@@ -62,8 +62,11 @@ class Plugin(GlancesPlugin): ...@@ -62,8 +62,11 @@ class Plugin(GlancesPlugin):
# We want to display the stat in the curse interface # We want to display the stat in the curse interface
self.display_curse = True self.display_curse = True
# Hide stats if it has never been != 0 # Hide stats if it has never been != 0
self.hide_zero = config.get_bool_value( if config is not None:
self.plugin_name, 'hide_zero', default=False) 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'] self.hide_zero_fields = ['rx', 'tx']
def get_key(self): def get_key(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册