summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/common_config.py
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-09-26 13:11:39 -0400
committerMark Stapp <mjs@voltanet.io>2020-09-26 15:40:00 -0400
commit1e5b2db6447dfffe8aa3e98a1362a7cb9e692e41 (patch)
treece5cf6456480e650da357d526c13e969cb0b779d /tests/topotests/lib/common_config.py
parent45c3045aef101f263838c9791c91e089e9c39f92 (diff)
tests: avoid python2 regex syntax
Update a few regexs to avoid python2-specific syntax Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'tests/topotests/lib/common_config.py')
-rw-r--r--tests/topotests/lib/common_config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index ff187b18c2..1fa6d35101 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -636,7 +636,7 @@ def get_frr_ipv6_linklocal(tgen, router, intf=None, vrf=None):
ll_per_if_count = 0
# Interface ip
- m1 = re_search("inet6 (fe80[:a-fA-F0-9]+[\/0-9]+)", line)
+ m1 = re_search("inet6 (fe80[:a-fA-F0-9]+[/0-9]+)", line)
if m1:
local = m1.group(1)
ll_per_if_count += 1
@@ -698,7 +698,7 @@ def start_topology(tgen, daemon=None):
router_list = tgen.routers()
ROUTER_LIST = sorted(
- router_list.keys(), key=lambda x: int(re_search("\d+", x).group(0))
+ router_list.keys(), key=lambda x: int(re_search("[0-9]+", x).group(0))
)
TMPDIR = os.path.join(LOGDIR, tgen.modname)
@@ -827,7 +827,7 @@ def topo_daemons(tgen, topo):
router_list = tgen.routers()
ROUTER_LIST = sorted(
- router_list.keys(), key=lambda x: int(re_search("\d+", x).group(0))
+ router_list.keys(), key=lambda x: int(re_search("[0-9]+", x).group(0))
)
for rtr in ROUTER_LIST: