Fix status for service loading

This commit is contained in:
Jerome Lebleu 2013-12-12 00:22:51 +01:00
parent 9599596356
commit 4c902a432e

View file

@ -127,7 +127,8 @@ def service_status(names=None):
ret = subprocess.check_output(status.split(), stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
# TODO: log error
result[name]['status'] = _("inactive")
if 'usage:' not in e.output.lower():
result[name]['status'] = _("inactive")
else:
result[name]['status'] = _("running")