diff Tests/Toolbox.py @ 9:3670535fbd4b

fix external thread
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Jun 2015 13:49:12 +0200
parents 6d645b3011e1
children 5f73008bb873
line wrap: on
line diff
--- a/Tests/Toolbox.py	Wed Jun 17 13:45:54 2015 +0200
+++ b/Tests/Toolbox.py	Wed Jun 17 13:49:12 2015 +0200
@@ -210,12 +210,13 @@
 
         print 'Stopping the external command'
         external.terminate()
+        external.communicate()  # Wait for the command to stop
 
     def __init__(self, command, env = None):
         self.thread_stop = threading.Event()
         self.thread = threading.Thread(target = self.ExternalCommandFunction, 
                                        args = (10, self.thread_stop, command, env))
-        self.daemon = True
+        #self.daemon = True
         self.thread.start()
 
     def stop(self):