diff --git a/tsshbatch.py b/tsshbatch.py index 52d5ad7..2d15515 100755 --- a/tsshbatch.py +++ b/tsshbatch.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # tsshbatch.py - Non-Interactive ssh Connection -# Copyright (c) 2011 TundraWare Inc. +# Copyright (c) 2011-2013 TundraWare Inc. # Permission Hereby Granted For Unrestricted Personal Or Commercial Use # See "tsshbatch-license.txt" For Licensing Details # @@ -17,7 +17,7 @@ PROGNAME = "tsshbatch.py" BASENAME = PROGNAME.split(".py")[0] PROGENV = BASENAME.upper() -RCSID = "$Id: tsshbatch.py,v 1.136 2013/02/22 20:36:23 tundra Exp $" +RCSID = "$Id: tsshbatch.py,v 1.137 2013/02/22 21:29:00 tundra Exp $" VERSION = RCSID.split()[2] CPRT = "(c)" @@ -57,7 +57,7 @@ # Constants And Literals ##### -FAILURE = "FAILURE: " +FAILURE = "FAILURE: %s" INDENTWIDTH = 8 OPTIONSLIST = "H:ehkn:p:v" PADWIDTH = 30 @@ -89,7 +89,7 @@ eBADFILE = "Cannot open '%s'!" eBADSUDO = "sudo Failed, Check Password Or Command! sudo Error Report: %s" eFEWARGS = "Too few command line arguments!" -eNOCONNECT = "Cannot Connect! (%s)" +eNOCONNECT = "Cannot Connect: %s" eNOLOGIN = "Cannot Login! (Login/Password Bad?)" @@ -200,7 +200,7 @@ # Everything else is some kind of connection problem except: - PrintReport([host, FAILURE % (eNOCONNECT % sys.exc_info()[1])], HANDLER=PrintStderr) + PrintReport([host, FAILURE % (eNOCONNECT % sys.exc_info()[1].message)], HANDLER=PrintStderr) ssh.close()