mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Avoid crash at capture startup with dynamips
This commit is contained in:
parent
1eb77a0b3f
commit
5c8b3f3f4c
@ -1310,6 +1310,11 @@ class Router(BaseNode):
|
|||||||
:param data_link_type: PCAP data link type (DLT_*), default is DLT_EN10MB
|
:param data_link_type: PCAP data link type (DLT_*), default is DLT_EN10MB
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
open(output_file, 'w+').close()
|
||||||
|
except OSError as e:
|
||||||
|
raise DynamipsError('Can not write capture to "{}": {}'.format(output_file, str(e)))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
adapter = self._slots[slot_number]
|
adapter = self._slots[slot_number]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
Loading…
Reference in New Issue
Block a user