mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 00:08:11 +00:00
Catch error when we can't access to a unix socket
This commit is contained in:
parent
94fd4bcbe9
commit
19b70accd5
@ -122,7 +122,10 @@ def _asyncio_open_serial_unix(path):
|
|||||||
raise NodeError('Pipe file "{}" is missing'.format(path))
|
raise NodeError('Pipe file "{}" is missing'.format(path))
|
||||||
|
|
||||||
output = SerialReaderWriterProtocol()
|
output = SerialReaderWriterProtocol()
|
||||||
con = yield from asyncio.get_event_loop().create_unix_connection(lambda: output, path)
|
try:
|
||||||
|
yield from asyncio.get_event_loop().create_unix_connection(lambda: output, path)
|
||||||
|
except ConnectionRefusedError:
|
||||||
|
raise NodeError('Can\'t open pipe file "{}"'.format(path))
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user