diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_scproxy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c index 8861dc4..dbee3f7 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -62,7 +62,10 @@ get_proxy_settings(PyObject* Py_UNUSED(mod), PyObject *Py_UNUSED(ignored)) PyObject* v; int r; + Py_BEGIN_ALLOW_THREADS proxyDict = SCDynamicStoreCopyProxies(NULL); + Py_END_ALLOW_THREADS + if (!proxyDict) { Py_RETURN_NONE; } @@ -172,7 +175,10 @@ get_proxies(PyObject* Py_UNUSED(mod), PyObject *Py_UNUSED(ignored)) int r; CFDictionaryRef proxyDict = NULL; + Py_BEGIN_ALLOW_THREADS proxyDict = SCDynamicStoreCopyProxies(NULL); + Py_END_ALLOW_THREADS + if (proxyDict == NULL) { return PyDict_New(); } |