mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Catch some exceptions.
This commit is contained in:
parent
4efdefaf5a
commit
4d95e0b51f
@ -315,7 +315,7 @@ class VPCSVM(BaseNode):
|
|||||||
if sys.platform.startswith("win32"):
|
if sys.platform.startswith("win32"):
|
||||||
try:
|
try:
|
||||||
self._process.send_signal(signal.CTRL_BREAK_EVENT)
|
self._process.send_signal(signal.CTRL_BREAK_EVENT)
|
||||||
except OSError:
|
except (SystemError, OSError):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
@ -446,6 +446,10 @@ class Compute:
|
|||||||
self._capabilities = response.json
|
self._capabilities = response.json
|
||||||
|
|
||||||
if response.json["version"].split("-")[0] != __version__.split("-")[0]:
|
if response.json["version"].split("-")[0] != __version__.split("-")[0]:
|
||||||
|
if self._name.startswith("GNS3 VM"):
|
||||||
|
msg = "GNS3 version {} is not the same as the GNS3 VM version {}. Please upgrade the GNS3 VM.".format(__version__,
|
||||||
|
response.json["version"])
|
||||||
|
else:
|
||||||
msg = "GNS3 controller version {} is not the same as compute server {} version {}".format(__version__,
|
msg = "GNS3 controller version {} is not the same as compute server {} version {}".format(__version__,
|
||||||
self._name,
|
self._name,
|
||||||
response.json["version"])
|
response.json["version"])
|
||||||
|
@ -215,7 +215,7 @@ class AsyncioTelnetServer:
|
|||||||
try:
|
try:
|
||||||
writer.write_eof()
|
writer.write_eof()
|
||||||
yield from writer.drain()
|
yield from writer.drain()
|
||||||
except ConnectionError:
|
except (AttributeError, ConnectionError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user