cosmetic
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 20 Nov 2008 13:04:45 +0000 (13:04 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 20 Nov 2008 13:04:45 +0000 (13:04 +0000)
system/TestPlc.py
system/utils.py

index 4a15ab7..2f338cd 100644 (file)
@@ -667,7 +667,15 @@ class TestPlc:
                 if datetime.datetime.now() > graceout:
                     success=utils.system(command)
                 else:
-                    success=os.system(command)
+                    # truly silent, just print out a dot to show we're alive
+                    print '.',
+                    sys.stdout.flush()
+                    command += " 2>/dev/null"
+                    if self.options.dry_run:
+                        print 'dry_run',command
+                        success=0
+                    else:
+                        success=os.system(command)
                 if success==0:
                     utils.header('Successfully entered root@%s (%s)'%(hostname,message))
                     # refresh tocheck
index 75250ef..2859642 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
-import time, os, re, glob
+import time, os, re, glob, sys
 from pprint import PrettyPrinter
 
 options={}
@@ -26,6 +26,9 @@ def system(command,background=False):
         print 'dry_run:',command
         return 0
     else:
+        now=time.strftime("%H:%M:%S", time.localtime())
+        print "*",now,'--',
+        sys.stdout.flush()
         return os.system("set -x; " + command)
 
 ### WARNING : this ALWAYS does its job, even in dry_run mode