diff options
Diffstat (limited to 'Modules/_scproxy.c')
-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 1ce4b77..e37515e 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -62,7 +62,10 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__))) PyObject* v; int r; + Py_BEGIN_ALLOW_THREADS proxyDict = SCDynamicStoreCopyProxies(NULL); + Py_END_ALLOW_THREADS + if (!proxyDict) { Py_INCREF(Py_None); return Py_None; @@ -173,7 +176,10 @@ get_proxies(PyObject* mod __attribute__((__unused__))) int r; CFDictionaryRef proxyDict = NULL; + Py_BEGIN_ALLOW_THREADS proxyDict = SCDynamicStoreCopyProxies(NULL); + Py_END_ALLOW_THREADS + if (proxyDict == NULL) { return PyDict_New(); } |