forked from ungleich-public/cdist
Exit with libexec command return code
This commit is contained in:
parent
7dddcb794b
commit
a812167dc6
1 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,7 @@ import os
|
||||||
import os.path
|
import os.path
|
||||||
import cdist.argparse
|
import cdist.argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
libexec_delimiter = '-'
|
libexec_delimiter = '-'
|
||||||
|
@ -38,4 +39,7 @@ def run(name, argv):
|
||||||
lib_path = os.path.join(libexec_path, lib_name)
|
lib_path = os.path.join(libexec_path, lib_name)
|
||||||
args = [lib_path, ]
|
args = [lib_path, ]
|
||||||
args.extend(argv)
|
args.extend(argv)
|
||||||
|
try:
|
||||||
subprocess.check_call(args)
|
subprocess.check_call(args)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
sys.exit(e.returncode)
|
||||||
|
|
Loading…
Reference in a new issue