b4585aa546
...per https://github.com/ClusterLabs/booth/pull/22#issuecomment-216936987 - pre-inclusion cleanups in the spec (apply systemd scriptlet operations with booth-arbitrator, avoid overloading file implicitly considered %%doc as %%license) Resolves: rhbz#1314865 Related: rhbz#1333509 Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From 4754bd5a62283359caa0867c4e6a463d2c62193c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
|
Date: Wed, 27 Apr 2016 20:58:33 +0200
|
|
Subject: [PATCH] test: booth cannot cope with <address>%<device> IPv6
|
|
addresses
|
|
|
|
...at least for the time being. So craft ::1 address in that case
|
|
as a substitute.
|
|
---
|
|
test/utils.py | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/test/utils.py b/test/utils.py
|
|
index cbbd8d4..ceeef98 100755
|
|
--- a/test/utils.py
|
|
+++ b/test/utils.py
|
|
@@ -12,5 +12,7 @@ def get_IP():
|
|
(stdout, stderr, returncode) = run_cmd(['hostname', '-i'])
|
|
if returncode != 0:
|
|
raise RuntimeError, "Failed to run hostname -i:\n" + stderr
|
|
- # in case multiple IP addresses are returned, use only the first.
|
|
- return re.sub(r'\s.*', '', stdout)
|
|
+ # in case multiple IP addresses are returned, use only the first
|
|
+ # and also strip '%<device>' part possibly present with IPv6 address
|
|
+ ret = re.sub(r'\s.*', '', stdout)
|
|
+ return "::1" if '%' in ret else ret
|
|
--
|
|
2.4.11
|
|
|