mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-15 12:27:24 -04:00
AMP plugin crashs on start with Python 3 (issue #917)
This commit is contained in:
@@ -69,7 +69,7 @@ class Amp(GlancesAmp):
|
||||
# Get the systemctl status
|
||||
logger.debug('{}: Update stats using service {}'.format(self.NAME, self.get('service_cmd')))
|
||||
try:
|
||||
res = check_output(self.get('service_cmd').split(), stderr=STDOUT)
|
||||
res = check_output(self.get('service_cmd').split(), stderr=STDOUT).decode('utf-8')
|
||||
except OSError as e:
|
||||
logger.debug('{}: Error while executing service ({})'.format(self.NAME, e))
|
||||
else:
|
||||
|
||||
@@ -122,7 +122,7 @@ class AmpsList(object):
|
||||
else:
|
||||
# Set the process number to 0
|
||||
v.set_count(0)
|
||||
if v.count_min() > 0:
|
||||
if v.count_min() is not None and v.count_min() > 0:
|
||||
# Only display the "No running process message" is countmin is defined
|
||||
v.set_result("No running process")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user