daemon: removed usages of getattr and hasattr where possible
This commit is contained in:
parent
6ef458fc74
commit
c2a40dbb6b
9 changed files with 30 additions and 28 deletions
|
@ -159,7 +159,7 @@ class NodeBase(abc.ABC):
|
|||
ifaces = []
|
||||
for iface_id in sorted(self.ifaces):
|
||||
iface = self.ifaces[iface_id]
|
||||
if not control and getattr(iface, "control", False):
|
||||
if not control and iface.control:
|
||||
continue
|
||||
ifaces.append(iface)
|
||||
return ifaces
|
||||
|
|
|
@ -73,6 +73,7 @@ class CoreInterface:
|
|||
self.net_client: LinuxNetClient = get_net_client(
|
||||
self.session.use_ovs(), self.host_cmd
|
||||
)
|
||||
self.control: bool = False
|
||||
|
||||
def host_cmd(
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue