From: Rafael Zalamena Date: Wed, 20 Dec 2017 12:07:31 +0000 (-0200) Subject: isis-topo1: simplify dictionary key removal code X-Git-Tag: frr-7.1-dev~151^2~162 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d43cd0fd620dc5be495358ff8a655b0b07b17d29;p=matthieu%2Ffrr.git isis-topo1: simplify dictionary key removal code Signed-off-by: Rafael Zalamena --- diff --git a/tests/topotests/isis-topo1/test_isis_topo1.py b/tests/topotests/isis-topo1/test_isis_topo1.py index c855644e39..544671da57 100644 --- a/tests/topotests/isis-topo1/test_isis_topo1.py +++ b/tests/topotests/isis-topo1/test_isis_topo1.py @@ -165,15 +165,8 @@ def test_isis_route_installation(): continue for nexthop in route['nexthops']: - try: - nexthop.pop('interfaceIndex') - except KeyError: - pass - - try: - nexthop.pop('interfaceName') - except KeyError: - pass + nexthop.pop('interfaceIndex', None) + nexthop.pop('interfaceName', None) assertmsg = "Router '{}' routes mismatch".format(rname) assert topotest.json_cmp(actual, expected) is None, assertmsg