Make sending the output of the dist command configurable

This commit is contained in:
Mark Veidemanis 2017-12-03 19:23:29 +00:00
parent e2682615ae
commit 96dd71bbdd
3 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,4 +3,5 @@
*.pem
config.json
pool.json
dist.sh
env/

View File

@ -8,6 +8,7 @@
"ConnectOnCreate": false,
"HighlightNotifications": true,
"DistEnabled": true,
"SendDistOutput": false,
"Password": "s",
"Default": {
"password": null,

View File

@ -471,7 +471,10 @@ class Helper(object):
elif cmd == "dist":
if config["DistEnabled"]:
rtrn = run(["./dist.sh"], shell=True, stdout=PIPE)
info("Exit code: %s -- Stdout: %s" % (rtrn.returncode, rtrn.stdout))
if config["SendDistOutput"]:
info("Exit code: %s -- Stdout: %s" % (rtrn.returncode, rtrn.stdout))
else:
info("Exit code: %s" % rtrn.returncode)
else:
failure("The dist command is not enabled")
return