A few small refactors, using get_by_name() more, casting boolean return values, etc

This commit is contained in:
Pim van Pelt
2022-03-16 22:20:51 +00:00
parent 252fa989b2
commit ccfb51189a
3 changed files with 26 additions and 73 deletions

View File

@ -32,6 +32,4 @@ def is_unique(yaml, lcpname):
for ifname, iface in yaml['bridgedomains'].items():
if 'lcp' in iface and iface['lcp'] == lcpname:
ncount = ncount + 1
if ncount > 1:
return False
return True
return ncount < 2