actions: Hush some unneeded output of systemd

This commit is contained in:
Sunil Mohan Adapa 2016-09-03 11:40:03 +05:30 committed by James Valleroy
parent 72c6aad514
commit 65aadef546
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
root is required, so that Plinth can run as non-root.
- xmpp: Switched to using ruamel.yaml to modify ejabberd config.
- Exit with error if any of the setup steps fail.
- actions: Hush some unneeded output of systemd.
## [0.10.0] - 2016-08-12
### Added

View File

@ -59,7 +59,8 @@ def service_is_running(servicename):
def service_is_enabled(service_name):
"""Check if service is enabled in systemd."""
try:
subprocess.check_output(['systemctl', 'is-enabled', service_name])
subprocess.run(['systemctl', 'is-enabled', service_name], check=True,
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
return True
except subprocess.CalledProcessError:
return False