fix
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 15 Jan 2010 10:36:42 +0000 (10:36 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 15 Jan 2010 10:36:42 +0000 (10:36 +0000)
system/TestSlice.py
system/utils.py

index 2676bc7..0de8d3e 100644 (file)
@@ -105,7 +105,7 @@ class TestSlice:
                 date_test_ssh = TestSsh (hostname,key=remote_privatekey,username=self.name())
                 command = date_test_ssh.actual_command("echo hostname ; hostname; echo id; id; echo uname -a ; uname -a")
                 date = utils.system (command, silent=datetime.datetime.now() < graceout)
-                if date:
+                if date==0:
                     utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname))
                     tocheck.remove(hostname)
                 else:
index a7637e6..9098b14 100644 (file)
@@ -25,7 +25,9 @@ def system(command,background=False,silent=False):
         print 'dry_run:',command
         return 0
     
-    if silent :    command += " 2> /dev/null"
+    if silent :    
+        if command.find(';')>=0: command = "(%s) 2> /dev/null" % command
+        else: command += " 2> /dev/null"
     if background: command += " &"
     if silent:
         print '.',