提交 6eb21d74 编写于 作者: N nicolargo

Correct issue on the --disable option

上级 b19b1f54
......@@ -87,7 +87,7 @@ class Plugin(GlancesPlugin):
# Reset stats
self.reset()
if self.args.disable_ip:
if self.args is not None and self.args.disable_ip:
return self.stats
if self.input_method == 'local' and netifaces_tag:
......
......@@ -63,7 +63,7 @@ class Plugin(GlancesPlugin):
self.reset()
# IRQ plugin only available on GNU/Linux
if not LINUX or self.args.disable_irq:
if not LINUX or (self.args is not None and self.args.disable_irq):
return self.stats
if self.input_method == 'local':
......
......@@ -73,7 +73,7 @@ class Plugin(GlancesPlugin):
# Reset stats
self.reset()
if self.args.disable_swap:
if self.args is not None and self.args.disable_swap:
return self.stats
if self.input_method == 'local':
......
......@@ -66,7 +66,7 @@ class Plugin(GlancesPlugin):
def update(self):
"""Update the ports list."""
if self.args.disable_ports:
if self.args is not None and self.args.disable_ports:
return self.stats
if self.input_method == 'local':
......
......@@ -60,7 +60,7 @@ class Plugin(GlancesPlugin):
# Reset stats
self.reset()
if self.args.disable_raid:
if self.args is not None and self.args.disable_raid:
return self.stats
if self.input_method == 'local':
......
......@@ -87,7 +87,7 @@ class Plugin(GlancesPlugin):
# Reset the stats
self.reset()
if self.args.disable_sensors:
if self.args is not None and self.args.disable_sensors:
return self.stats
if self.input_method == 'local':
......
......@@ -84,7 +84,7 @@ class Plugin(GlancesPlugin):
self.reset()
# Exist if we can not grab the stats
if not wifi_tag or self.args.disable_wifi:
if not wifi_tag or (self.args is not None and self.args.disable_wifi):
return self.stats
if self.input_method == 'local':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册