mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-22 06:07:51 +00:00
Improve the invalid port format detection. Fixes https://github.com/GNS3/gns3-gui/issues/2580
This commit is contained in:
parent
abfbadecd6
commit
c620d0be84
@ -72,7 +72,7 @@ class StandardPortFactory:
|
|||||||
segment_number,
|
segment_number,
|
||||||
adapter=adapter_number,
|
adapter=adapter_number,
|
||||||
**cls._generate_replacement(interface_number, segment_number))
|
**cls._generate_replacement(interface_number, segment_number))
|
||||||
except (ValueError, KeyError) as e:
|
except (IndexError, ValueError, KeyError) as e:
|
||||||
raise aiohttp.web.HTTPConflict(text="Invalid port name format {}: {}".format(port_name_format, str(e)))
|
raise aiohttp.web.HTTPConflict(text="Invalid port name format {}: {}".format(port_name_format, str(e)))
|
||||||
port = PortFactory(port_name, segment_number, adapter_number, port_number, "ethernet")
|
port = PortFactory(port_name, segment_number, adapter_number, port_number, "ethernet")
|
||||||
interface_number += 1
|
interface_number += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user