Ignore exception in asyncio loop on Windows when the local server gets a signal.

pull/100/head
Jeremy 9 years ago
parent 03796ca729
commit 36daa3627e

@ -221,4 +221,10 @@ class Server:
if server_config.getboolean("shell"):
asyncio.async(self.start_shell())
self._loop.run_forever()
try:
self._loop.run_forever()
except TypeError as e:
# This is to ignore an asyncio.windows_events exception
# on Windows when the process get the SIGBREAK signal
# TypeError: async() takes 1 positional argument but 3 were given
log.warning("TypeError exception in the loop {}".format(e))

Loading…
Cancel
Save