Refactor and clean up some repetitive code

This commit is contained in:
Pim van Pelt
2022-04-12 11:04:13 +00:00
parent 594e21afa4
commit eee718c77c
2 changed files with 17 additions and 35 deletions

View File

@ -70,6 +70,7 @@ class VPPApi():
def cache_remove_lcp(self, lcpname):
""" Removes the LCP and TAP interface, identified by lcpname, from the config. """
found=False
for idx, lcp in self.cache['lcps'].items():
if lcp.host_if_name == lcpname:
found = True