changeset 9:3670535fbd4b

fix external thread
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Jun 2015 13:49:12 +0200
parents f8d781d1d267
children 5f73008bb873
files Tests/Toolbox.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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):