提交 55346cd1 编写于 作者: N nicolargo

AMP plugin crashs on start with Python 3 (issue #917)

上级 409269e3
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册