--- /tmp/urllib.py 2010-12-07 15:00:22.000000000 +0800 +++ /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py 2010-12-07 15:00:33.000000000 +0800 @@ -1376,7 +1376,7 @@ continue base = ip2num(m.group(1)) - mask = int(m.group(2)[1:]) + mask = int(m.group(2)[1:]) if m.group(2) else 32 mask = 32 - mask if (hostIP >> mask) == (base >> mask):