]> granicus.if.org Git - python/commitdiff
The code in _scproxy (a mac specific helper module to
authorRonald Oussoren <ronaldoussoren@mac.com>
Tue, 22 Jun 2010 09:32:22 +0000 (09:32 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Tue, 22 Jun 2010 09:32:22 +0000 (09:32 +0000)
detect proxy settings) had the wrong logic for detecting
if the checkbox 'Exclude simple hostnames' is checked. This
checkin fixes that.

As a result the test failure 'Issue8455' goes away on systems
where the checkbox is not checked.

I'm carefully avoiding saying that is fixes that issue,
test_urllib2_localnet assumes that system proxy settings are
empty (not just on OSX, see Issue8455 for details).

Mac/Modules/_scproxy.c

index dd5a2930180205784d9c3be9971d95c2382be111..b393fd14cc0e3606539e28d808fb7539762c4289 100644 (file)
@@ -68,7 +68,7 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__)))
         aNum = CFDictionaryGetValue(proxyDict,
             kSCPropNetProxiesExcludeSimpleHostnames);
         if (aNum == NULL) {
-            v = PyBool_FromLong(1);
+            v = PyBool_FromLong(0);
         } else {
             v = PyBool_FromLong(cfnum_to_int32(aNum));
         }