1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Improve error message about the netmask

Ref #1751
This commit is contained in:
Julien Duponchelle 2017-01-05 14:51:43 +01:00
parent c9fc0a0d6d
commit 12f09829e7
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -253,13 +253,13 @@ class Cloud(BaseNode):
interface=port_info["interface"]))
return
if not gns3server.utils.interfaces.has_netmask(port_info["interface"]):
raise NodeError("Interface {} don't have a netmask".format(port_info["interface"]))
raise NodeError("Interface {} has no netmask, interface down?".format(port_info["interface"]))
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name, interface=port_info["interface"]))
@asyncio.coroutine
def _add_windows_ethernet(self, port_info, bridge_name):
if not gns3server.utils.interfaces.has_netmask(port_info["interface"]):
raise NodeError("Interface {} don't have a netmask".format(port_info["interface"]))
raise NodeError("Interface {} has no netmask, interface down?".format(port_info["interface"]))
yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name, interface=port_info["interface"]))
@asyncio.coroutine