Implement config option to print results

This commit is contained in:
f3flight 2016-06-09 21:10:58 +00:00
parent b5907b446d
commit d3f29c09ff
2 changed files with 5 additions and 2 deletions

View File

@ -163,6 +163,7 @@ def main(argv=None):
conf['fuel_pass'] = args.fuel_pass
if args.put or args.command or args.script or args.get:
conf['shell_mode'] = True
conf['do_print_results'] = True
if args.no_clean:
conf['clean'] = False
if conf['shell_mode']:
@ -238,8 +239,8 @@ def main(argv=None):
if not args.quiet:
print('Run complete. Node information:')
print(nm)
if conf['shell_mode']:
if args.command or args.script:
if conf['do_print_results']:
if nm.has(Node.ckey, Node.skey):
if not args.quiet:
print('Results:')
for node in nm.sorted_nodes():

View File

@ -51,6 +51,8 @@ def load_conf(filename):
place specified by conf['outdir'], archive will also be created and put
in a place specified by conf['archive_dir'].'''
conf['shell_mode'] = False
'''Print output of commands and scripts to stdout'''
conf['do_print_results'] = False
'''Clean - erase previous results in outdir and archive_dir dir, if any.'''
conf['clean'] = True
if filename: