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

Correct issue on the --disable option

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