summaryrefslogtreecommitdiffstats
path: root/tests/topotests/lib/bgp.py
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-12-17 20:04:21 +0100
committerDonald Sharp <sharpd@nvidia.com>2020-12-19 01:12:30 +0100
commit29c0ce20ef94bdd0bec642f40cf623db7320345d (patch)
tree13f8517177fd7f25b87fe28779a2e2afbbea7599 /tests/topotests/lib/bgp.py
parentMerge pull request #7766 from deastoe/dplane-fpm-nl_optimisations (diff)
downloadfrr-29c0ce20ef94bdd0bec642f40cf623db7320345d.tar.xz
frr-29c0ce20ef94bdd0bec642f40cf623db7320345d.zip
tests: dict_values are not lists in version 3
While accidently running the topotests with version 3 I keep getting: TypeError: `dict_values` object does not support indexing.. version 2 of python dict.values() returns a list. version 3 does not Write some code to allow both to be handled. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'tests/topotests/lib/bgp.py')
-rw-r--r--tests/topotests/lib/bgp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/topotests/lib/bgp.py b/tests/topotests/lib/bgp.py
index ddeaf55b3..0462cfbff 100644
--- a/tests/topotests/lib/bgp.py
+++ b/tests/topotests/lib/bgp.py
@@ -2129,7 +2129,9 @@ def verify_bgp_attributes(
dict_to_test = []
tmp_list = []
- if "route_maps" in input_dict.values()[0]:
+ dict_list = list(input_dict.values())[0]
+
+ if "route_maps" in dict_list:
for rmap_router in input_dict.keys():
for rmap, values in input_dict[rmap_router]["route_maps"].items():
if rmap == rmap_name: