Commit b96fbb8d authored by Ronald Oussoren's avatar Ronald Oussoren

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.
parent 76002c8f
......@@ -1383,8 +1383,13 @@ if sys.platform == 'darwin':
continue
base = ip2num(m.group(1))
mask = int(m.group(2)[1:])
mask = 32 - mask
mask = m.group(2)
if mask is None:
mask = 8 * (m.group(1).count('.') + 1)
else:
mask = int(mask[1:])
mask = 32 - mask
if (hostIP >> mask) == (base >> mask):
return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment