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

Avoid crash at capture startup with dynamips

This commit is contained in:
Julien Duponchelle 2016-05-16 18:45:03 +02:00
parent 1eb77a0b3f
commit 5c8b3f3f4c
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -1310,6 +1310,11 @@ class Router(BaseNode):
: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:
adapter = self._slots[slot_number]
except IndexError: