added othernet to CoreInterface to avoid hasattr checks

This commit is contained in:
Blake Harnden 2020-05-23 01:14:47 -07:00
parent c580e15f8e
commit 964f78f06a
3 changed files with 4 additions and 3 deletions

View file

@ -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