mirror of
https://github.com/python/cpython.git
synced 2025-08-19 16:20:59 +00:00
Fix for Issue8883: without this patch test_urllib will fail
when there is a bare IP address in the "Bypass proxy settings for these Hosts & Domains" list on MacOSX.
This commit is contained in:
parent
76002c8f1d
commit
b96fbb8d00
1 changed files with 7 additions and 2 deletions
|
@ -1383,8 +1383,13 @@ if sys.platform == 'darwin':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
base = ip2num(m.group(1))
|
base = ip2num(m.group(1))
|
||||||
mask = int(m.group(2)[1:])
|
mask = m.group(2)
|
||||||
mask = 32 - mask
|
if mask is None:
|
||||||
|
mask = 8 * (m.group(1).count('.') + 1)
|
||||||
|
|
||||||
|
else:
|
||||||
|
mask = int(mask[1:])
|
||||||
|
mask = 32 - mask
|
||||||
|
|
||||||
if (hostIP >> mask) == (base >> mask):
|
if (hostIP >> mask) == (base >> mask):
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue