Commit 1c3d1939 authored by Ronald Oussoren's avatar Ronald Oussoren

This patch fixes the handling of a weak-linked

variable and should fix issue #8095.
parent 1bf02022
......@@ -64,13 +64,18 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__)))
result = PyDict_New();
if (result == NULL) goto error;
aNum = CFDictionaryGetValue(proxyDict,
if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
aNum = CFDictionaryGetValue(proxyDict,
kSCPropNetProxiesExcludeSimpleHostnames);
if (aNum == NULL) {
v = PyBool_FromLong(0);
} else {
v = PyBool_FromLong(cfnum_to_int32(aNum));
if (aNum == NULL) {
v = PyBool_FromLong(1);
} else {
v = PyBool_FromLong(cfnum_to_int32(aNum));
}
} else {
v = PyBool_FromLong(1);
}
if (v == NULL) goto error;
r = PyDict_SetItemString(result, "exclude_simple", v);
......
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