1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

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

This commit is contained in:
Jeremy 2015-03-12 18:48:07 -06:00
parent 03796ca729
commit 36daa3627e

View File

@ -221,4 +221,10 @@ class Server:
if server_config.getboolean("shell"): if server_config.getboolean("shell"):
asyncio.async(self.start_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))