third-party-ci-tools/monitoring/nagios/checks/utils.py

8 lines
196 B
Python

import subprocess
def run_command_local(command):
try:
return subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)
except Exception, e:
return e.message