1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Fix some port short name display issues

Fix https://github.com/GNS3/gns3-gui/issues/1940
This commit is contained in:
Julien Duponchelle 2017-03-20 18:10:00 +01:00
parent 95f864c871
commit 5409d9c3f8
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -66,7 +66,7 @@ class Port:
# If port name format has change we use the port name as the short name (1.X behavior)
if self._short_name:
return self._short_name
elif not self._name.startswith(self.long_name_type()):
elif not self._name.startswith("{}{}".format(self.long_name_type(), self._interface_number)):
return self._name
return self.short_name_type + "{}/{}".format(self._interface_number, self._port_number)