Commit f0d4a464 authored by Samuel GAIST's avatar Samuel GAIST Committed by Flavio TARSETTI

Fix wait method

parent 74ad0985
......@@ -223,7 +223,12 @@ class DBExecutor(object):
def wait(self):
"""Wait for the message handle to finish"""
self.message_handler.join()
try:
self.message_handler.join()
except RuntimeError:
# tried to join the handler before it has started.
pass
self.message_handler = None
def __str__(self):
......
......@@ -291,7 +291,12 @@ class LoopExecutor(object):
def wait(self):
"""Wait for the message handle to finish"""
self.message_handler.join()
try:
self.message_handler.join()
except RuntimeError:
# tried to join the handler before it has started.
pass
self.message_handler = None
def close(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment