summaryrefslogtreecommitdiffhomepage
path: root/test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/base.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/test/lib/base.py b/test/lib/base.py
index 161bb9eb..7718de93 100644
--- a/test/lib/base.py
+++ b/test/lib/base.py
@@ -403,14 +403,7 @@ class BGPContainer(Container):
def del_route(self, route, identifier=None, reload_config=True):
if route not in self.routes:
return
- if identifier:
- new_paths = []
- for path in self.routes[route]:
- if path['identifier'] != identifier:
- new_paths.append(path)
- self.routes[route] = new_paths
- else:
- self.routes[route] = []
+ self.routes[route] = [p for p in self.routes[route] if p['identifier'] != identifier]
if self.is_running and reload_config:
self.create_config()
self.reload_config()