New submission from Yuriy Taraday <yorik....@gmail.com>: I have straight IP in my proxy exception list like "192.168.0.2" without mask specification.
The proxy_bypass_macosx_sysconf function verifies each item in this list by regexp r"(\d+(?:\.\d+)*)(/\d+)?" that produces two groups: IP and mask. The mask can be None here (as in my case) and this None case isn't handled, so urllib crashes with "TypeError: 'NoneType' object is unsubscriptable". I couldn't find specification of MacOS proxy exceptions list, so I don't know whether you can use just IP or prefix without mask specification. If you can, here is small patch that adds nesessary check and guesses mask if it is not specified. If you cannot, the last question mark should be removed from regex. ---------- components: Library (Lib) files: urllib.py.diff keywords: patch messages: 106933 nosy: yorik.sar priority: normal severity: normal status: open title: Proxy exception lookup fails on MacOS in urllib. type: crash versions: Python 2.6 Added file: http://bugs.python.org/file17526/urllib.py.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8883> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com