mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
nixosTests.ipv6: fix regular expression match conditions
This commit is contained in:
committed by
Jacek Galowicz
parent
bdde743d2d
commit
76fd8788cd
@@ -81,7 +81,11 @@
|
||||
|
||||
machine.wait_until_succeeds(f"[ `{cmd} | wc -l` -eq 1 ]")
|
||||
output = machine.succeed(cmd)
|
||||
ip = re.search(r"inet6 ([0-9a-f:]{2,})/", output).group(1)
|
||||
matches: re.Match | None = re.search(r"inet6 ([0-9a-f:]{2,})/", output)
|
||||
if matches is None:
|
||||
raise Exception(f"Can't match IP out of output: {output}")
|
||||
|
||||
ip = matches.group(1)
|
||||
|
||||
if temporary:
|
||||
scope = scope + " temporary"
|
||||
|
||||
Reference in New Issue
Block a user