Skip to content

Commit 04fff27

Browse files
committed
Fix verify-ipv6-address.py crash on Python 3.14
The argparse help string contains "fe80::1%eth0" where "%e" is interpreted as a printf-style format specifier. Python 3.14 added eager validation of help strings at add_argument() time (cpython commit eb2d268ac7), causing the script to crash with "ValueError: badly formed help string" before it even parses the address. This potentially breaks all IPv6 Zuul jobs on Resolute nodes. Escape "%" as "%%" per the argparse documentation. Closes-Bug: #2158736 Change-Id: Ieda0388548d5964ec9dbc3cff52540a19e9f5625 Signed-off-by: Omer <oschwart@redhat.com>
1 parent ce1ed85 commit 04fff27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/verify-ipv6-address.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def main():
1717
" 2001:0db8:85a3:0000:0000:8a2e:0370:7334\n"
1818
" 2001:db8::1\n"
1919
" ::1\n"
20-
" fe80::1%eth0 (scope IDs are handled)"
20+
" fe80::1%%eth0 (scope IDs are handled)"
2121
),
2222
)
2323
args = parser.parse_args()

0 commit comments

Comments
 (0)