added othernet to CoreInterface to avoid hasattr checks
This commit is contained in:
parent
c580e15f8e
commit
964f78f06a
3 changed files with 4 additions and 3 deletions
|
@ -580,7 +580,7 @@ class CoreNetwork(CoreNetworkBase):
|
|||
:return: interface the provided network is linked to
|
||||
"""
|
||||
for netif in self.netifs():
|
||||
if hasattr(netif, "othernet") and netif.othernet == net:
|
||||
if netif.othernet == net:
|
||||
return netif
|
||||
return None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue