diff --git a/tsshbatch.py b/tsshbatch.py index eeb1e03..9031b94 100755 --- a/tsshbatch.py +++ b/tsshbatch.py @@ -12,7 +12,7 @@ PROGNAME = "tsshbatch.py" BASENAME = PROGNAME.split(".py")[0] PROGENV = BASENAME.upper() -RCSID = "$Id: tsshbatch.py,v 1.124 2011/12/30 22:57:07 tundra Exp $" +RCSID = "$Id: tsshbatch.py,v 1.125 2011/12/30 23:04:54 tundra Exp $" VERSION = RCSID.split()[2] CPRT = "(c)" @@ -161,10 +161,10 @@ stdin.write("%s\n" % pw) stdin.flush() - PrintReport([host, SUCCESS] + stdout.readlines()) + PrintReport([host + " (stdout)", SUCCESS] + stdout.readlines()) if REPORTERR: - PrintReport(["", ""] + stderr.readlines(), HANDLER=PrintStderr) + PrintReport([host + " (stderr)", ""] + stderr.readlines(), HANDLER=PrintStderr) # Catch authentication problems explicitly @@ -191,14 +191,10 @@ def PrintReport(results, HANDLER=PrintStdout): - # Any empty hostname here means that we're reporting stderr output - # and do not need to print the header again. - - if results[0]: - HANDLER(SEPARATOR + results[0] + - TRAILER + - (PADWIDTH - len(results[0])) * " " + - results[1]) + HANDLER(SEPARATOR + results[0] + + TRAILER + + (PADWIDTH - len(results[0])) * " " + + results[1]) for r in results[2:]: # Command Results HANDLER(INDENTWIDTH * " " + r.strip())