summaryrefslogtreecommitdiffstats
path: root/Python/makeopcodetargets.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-03 12:37:17 (GMT)
committerGitHub <noreply@github.com>2022-05-03 12:37:17 (GMT)
commit5f709bdb86261fdba3ea8e5fd529f8af9fca4f42 (patch)
treecefc25958ebb36f19680bece7b031ca616190aff /Python/makeopcodetargets.py
parent62ddbbcfafc98aaa4d0345bba56f7d6cd346c83f (diff)
downloadcpython-5f709bdb86261fdba3ea8e5fd529f8af9fca4f42.zip
cpython-5f709bdb86261fdba3ea8e5fd529f8af9fca4f42.tar.gz
cpython-5f709bdb86261fdba3ea8e5fd529f8af9fca4f42.tar.bz2
bpo-46415: Use f-string for ValueError in ipaddress.ip_{address,network,interface} helper functions (GH-30642)
`IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of (address description, netmask) as the address parameter. When the tuple-based address is used errors are not propagated correctly through the `ipaddress.ip_*` helper because of the %-formatting now expecting several arguments: In [7]: ipaddress.ip_network(("192.168.100.0", "fooo")) ... TypeError: not all arguments converted during string formatting Compared to: In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo")) ... NetmaskValueError: 'foo' is not a valid netmask Use an f-string to make sure the error is always properly formatted. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 52dc9c3066bcdc67a7a45d41cf158ecb1434d5f3) Co-authored-by: Thomas Cellerier <thomascellerier@gmail.com>
Diffstat (limited to 'Python/makeopcodetargets.py')
0 files changed, 0 insertions, 0 deletions