use -e to shell

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-08 14:45:54 +02:00
parent 1d367d5f58
commit c8ce7e98ec
1 changed files with 4 additions and 1 deletions

View File

@ -101,6 +101,10 @@ class Cdist:
kargs['shell'] = True
log.debug("Shell exec: " + " ".join(*args))
# Fail if the script fails
args[0].insert(0,"-e")
print(args)
try:
subprocess.check_call(*args, **kargs)
except subprocess.CalledProcessError:
@ -219,7 +223,6 @@ if __name__ == "__main__":
for host in args.host:
c = Cdist(host)
c.deploy_to()
print(c.list_global_explorers())
c.cleanup()
except KeyboardInterrupt:
sys.exit(0)