summaryrefslogtreecommitdiff
path: root/Modules/_scproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_scproxy.c')
-rw-r--r--Modules/_scproxy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c
index 8861dc456d..dbee3f7367 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();
}