daemon: removed usages of getattr and hasattr where possible

This commit is contained in:
Blake Harnden 2021-01-12 21:30:48 -08:00
parent 6ef458fc74
commit c2a40dbb6b
9 changed files with 30 additions and 28 deletions

View file

@ -66,7 +66,7 @@ class FRRZebra(CoreService):
for iface in node.get_ifaces():
cfg += "interface %s\n" % iface.name
# include control interfaces in addressing but not routing daemons
if hasattr(iface, "control") and iface.control is True:
if iface.control:
cfg += " "
cfg += "\n ".join(map(cls.addrstr, iface.ips()))
cfg += "\n"