Commit dd9cc7b5 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
on stackoverflow.
parent ed9a7f37
...@@ -284,7 +284,10 @@ autoconf={5},disable_colors={6},key_inject={7} \ ...@@ -284,7 +284,10 @@ autoconf={5},disable_colors={6},key_inject={7} \
print(fabcmd) print(fabcmd)
if not args.dry_run: if not args.dry_run:
sys.exit(os.system(fabcmd)) ret = os.system(fabcmd)
if ret != 0:
print "exit with status %s" % ret
def cluster(args, env): 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