updated network.py to leverage super()

This commit is contained in:
bharnden 2019-10-23 10:16:35 -07:00
parent 68be311c7a
commit b185c3c679
2 changed files with 16 additions and 24 deletions

View file

@ -139,7 +139,7 @@ class NodeBase:
if sort:
return [self._netif[x] for x in sorted(self._netif)]
else:
return self._netif.values()
return list(self._netif.values())
def numnetif(self):
"""
@ -158,11 +158,9 @@ class NodeBase:
:return: interface index if found, -1 otherwise
:rtype: int
"""
for ifindex in self._netif:
if self._netif[ifindex] is netif:
return ifindex
return -1
def newifindex(self):