util/ProcessLogger.py
changeset 1506 b9b8978dbc9d
parent 1476 49f1763a5613
child 1507 d7f474d10210
--- a/util/ProcessLogger.py	Wed Apr 27 18:42:30 2016 +0300
+++ b/util/ProcessLogger.py	Thu Apr 28 12:58:58 2016 +0300
@@ -124,6 +124,12 @@
         elif wx.Platform == '__WXGTK__':
             popenargs["shell"] = False
 
+        if timeout:
+            self.timeout = Timer(timeout,self.endlog)
+            self.timeout.start()
+        else:
+            self.timeout = None
+            
         self.Proc = subprocess.Popen( self.Command, **popenargs )
 
         self.outt = outputThread(
@@ -139,11 +145,6 @@
                       self.errors)
         self.errt.start()
 
-        if timeout:
-            self.timeout = Timer(timeout,self.endlog)
-            self.timeout.start()
-        else:
-            self.timeout = None
 
     def output(self,v):
         self.outdata.append(v)