missing d in function name:

is_disable() -> is_disabled()
This commit is contained in:
H4ckerxx44 2021-11-13 17:15:24 +01:00
parent 2ccfae0779
commit a21f9e15c2
25 changed files with 28 additions and 28 deletions

View File

@ -94,7 +94,7 @@ class GlancesStdoutIssue(object):
self.print_version()
for plugin in sorted(stats._plugins):
if stats._plugins[plugin].is_disable():
if stats._plugins[plugin].is_disabled():
continue
try:
# Update the stats
@ -105,7 +105,7 @@ class GlancesStdoutIssue(object):
time.sleep(3)
for plugin in sorted(stats._plugins):
if stats._plugins[plugin].is_disable():
if stats._plugins[plugin].is_disabled():
# If current plugin is disable
# then continue to next plugin
result = colors.NO + '[N/A]'.rjust(19 - len(plugin))

View File

@ -210,7 +210,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Build the string message

View File

@ -98,7 +98,7 @@ class Plugin(GlancesPlugin):
# Only process if stats exist and display plugin enable...
ret = []
if not self.stats or args.disable_process or self.is_disable():
if not self.stats or args.disable_process or self.is_disabled():
return ret
# Build the string message

View File

@ -107,7 +107,7 @@ class Plugin(GlancesPlugin):
# Init the return message
ret = []
if not self.stats or self.stats == {} or self.is_disable():
if not self.stats or self.stats == {} or self.is_disabled():
return ret
# Generate the output

View File

@ -146,7 +146,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Header

View File

@ -279,7 +279,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and plugin not disable
if not self.stats or self.args.percpu or self.is_disable():
if not self.stats or self.args.percpu or self.is_disabled():
return ret
# If user stat is not here, display only idle / total CPU usage (for

View File

@ -177,7 +177,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -570,7 +570,7 @@ class Plugin(GlancesPlugin):
# Only process if stats exist (and non null) and display plugin enable...
if not self.stats \
or 'containers' not in self.stats or len(self.stats['containers']) == 0 \
or self.is_disable():
or self.is_disabled():
return ret
# Build the string message

View File

@ -112,7 +112,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -205,7 +205,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -166,7 +166,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist, not empty (issue #871) and plugin not disabled
if not self.stats or (self.stats == []) or self.is_disable():
if not self.stats or (self.stats == []) or self.is_disabled():
return ret
# Check if all GPU have the same name

View File

@ -114,7 +114,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable() or import_error_tag:
if not self.stats or self.is_disabled() or import_error_tag:
return ret
# Build the string message

View File

@ -90,7 +90,7 @@ class Plugin(GlancesPlugin):
# Only available on GNU/Linux
# Only process if stats exist and display plugin enable...
if not LINUX or not self.stats or self.is_disable():
if not LINUX or not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -160,7 +160,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist, not empty (issue #871) and plugin not disabled
if not self.stats or (self.stats == {}) or self.is_disable():
if not self.stats or (self.stats == {}) or self.is_disabled():
return ret
# Build the string message

View File

@ -221,7 +221,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and plugin not disabled
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# First line

View File

@ -177,7 +177,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and plugin not disabled
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# First line

View File

@ -301,7 +301,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -78,11 +78,11 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist...
if not self.stats or not self.args.percpu or self.is_disable():
if not self.stats or not self.args.percpu or self.is_disabled():
return ret
# Build the string message
if self.is_disable('quicklook'):
if self.is_disabled('quicklook'):
msg = '{:7}'.format('PER CPU')
ret.append(self.curse_add_line(msg, "TITLE"))
@ -96,7 +96,7 @@ class Plugin(GlancesPlugin):
# Per CPU stats displayed per column
for cpu in self.stats:
ret.append(self.curse_new_line())
if self.is_disable('quicklook'):
if self.is_disabled('quicklook'):
try:
msg = '{:6.1f}%'.format(cpu['total'])
except TypeError:

View File

@ -173,7 +173,7 @@ class GlancesPlugin(object):
d = getattr(self.args, 'enable_' + plugin_name, True)
return d is False
def is_disable(self, plugin_name=None):
def is_disabled(self, plugin_name=None):
"""Return true if plugin is disabled."""
return not self.is_enable(plugin_name=plugin_name)

View File

@ -111,7 +111,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Define the data: Bar (default behavor) or Sparkline

View File

@ -83,7 +83,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -201,7 +201,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or self.is_disable():
if not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -180,7 +180,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist...
if import_error_tag or not self.stats or self.is_disable():
if import_error_tag or not self.stats or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -168,7 +168,7 @@ class Plugin(GlancesPlugin):
ret = []
# Only process if stats exist and display plugin enable...
if not self.stats or import_error_tag or self.is_disable():
if not self.stats or import_error_tag or self.is_disabled():
return ret
# Max size for the interface name

View File

@ -100,7 +100,7 @@ class GlancesStatsClientSNMP(GlancesStats):
"""Update the stats using SNMP."""
# For each plugins, call the update method
for p in self._plugins:
if self._plugins[p].is_disable():
if self._plugins[p].is_disabled():
# If current plugin is disable
# then continue to next plugin
continue