Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tesh.py: also work when there is no wrapper :(
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 3 Sep 2016 15:29:00 +0000 (17:29 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 3 Sep 2016 15:29:00 +0000 (17:29 +0200)
tools/tesh/tesh.py

index 4a635be..1e67418 100755 (executable)
@@ -162,6 +162,7 @@ class TeshState(Singleton):
         self.threads = []
         self.args_suffix = ""
         self.ignore_regexps_common = []
         self.threads = []
         self.args_suffix = ""
         self.ignore_regexps_common = []
+        self.wrapper = None
     
     def add_thread(self, thread):
         self.threads.append(thread)
     
     def add_thread(self, thread):
         self.threads.append(thread)
@@ -283,13 +284,14 @@ class Cmd(object):
             if lock is not None: lock.release()
             return
         
             if lock is not None: lock.release()
             return
         
-        self.args = TeshState().wrapper + self.args + TeshState().args_suffix
-        
-        print("["+FileReader().filename+":"+str(self.linenumber)+"] "+self.args)
-        
         if TeshState().wrapper is not None:
             self.timeout *= 20
         if TeshState().wrapper is not None:
             self.timeout *= 20
+            self.args = TeshState().wrapper + self.args
+            
+        self.args += TeshState().args_suffix
         
         
+        print("["+FileReader().filename+":"+str(self.linenumber)+"] "+self.args)
+                
         args = shlex.split(self.args)
         #print (args)
         try:
         args = shlex.split(self.args)
         #print (args)
         try: