If the cooker fails to start, ensure a correct exception is displayed to the
user. After handling any queued events simply re-raise the original exception
else the output can be unclear.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
server.addcooker(cooker)
server.saveConnectionDetails()
except Exception as e:
- exc_info = sys.exc_info()
while hasattr(server, "event_queue"):
try:
import queue
break
if isinstance(event, logging.LogRecord):
logger.handle(event)
- raise exc_info[1], None, exc_info[2]
+ raise
server.detach()
cooker.lock.close()
return server