X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=nagixsc_conf2xml.py;h=d1ae4a8c9cbe351a0eda691d793c7b878f7e2af2;hb=b3fcf0f48a9df34f5f647d9b93a15992fb6bbc0e;hp=029fa3fe2f6fd1692a8d8212cfae55f6c785bfa9;hpb=cb7358bf3cf86d951c791c62c7a90d3c38f04b27;p=nagixsc.git diff --git a/nagixsc_conf2xml.py b/nagixsc_conf2xml.py index 029fa3f..d1ae4a8 100755 --- a/nagixsc_conf2xml.py +++ b/nagixsc_conf2xml.py @@ -2,6 +2,7 @@ import ConfigParser import optparse +import shlex import subprocess import sys @@ -43,7 +44,7 @@ if options.encoding not in available_encodings(): def exec_check(host_name, service_descr, cmdline): try: - cmd = subprocess.Popen(cmdline.split(' '), stdout=subprocess.PIPE) + cmd = subprocess.Popen(shlex.split(cmdline), stdout=subprocess.PIPE) output = cmd.communicate()[0].rstrip() retcode = cmd.returncode except OSError: