Commit b9b02405 by Michael DeHaan

Continued ans-command output upgrades, fixed output_dest back again

parent d6dcaefa
...@@ -108,10 +108,17 @@ def main(args): ...@@ -108,10 +108,17 @@ def main(args):
hostname, rc, msg hostname, rc, msg
) )
else: else:
print "%s | rc=%s >>" % (hostname, rc) buf = ''
print stdout buf += "%s | rc=%s >>\n" % (hostname, rc)
buf += stdout
if stderr: if stderr:
print stderr buf += stderr
print buf
if options.output_dest:
path = os.path.join(options.output_dest, hostname)
fd = open(path, "w+")
fd.write(buf)
fd.close()
if results['dark']: if results['dark']:
error_print('Hosts which could not be contacted or did not respond:') error_print('Hosts which could not be contacted or did not respond:')
......
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