Commit d16c2ae1 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

snf-deploy: Exit when fab command fails

The previous approach (using the return value from
os.system for sys.exit) was false. For more information, see
`how-to-bypass-the-0-255-range-limit-for-sys-exit-in-python'
on stackoverflow.
parent 658624db
......@@ -284,7 +284,10 @@ autoconf={5},disable_colors={6},key_inject={7} \
print(fabcmd)
if not args.dry_run:
sys.exit(os.system(fabcmd))
ret = os.system(fabcmd)
if ret != 0:
print "exit with status %s" % ret
sys.exit(ret)
def cluster(args, env):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment