
| Current Path : /usr/local/lib/python3.8/dist-packages/dbxfs/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //usr/local/lib/python3.8/dist-packages/dbxfs/macos_proxies_crash_fix.py |
import sys
import urllib.request
def macos_proxies_crash_fix():
# calling the mac os API to get proxies from the system
# after doing fork() causes crashes because those APIs
# expect to be re-initialized after fork() but that
# doesn't happen, so we
if '--print-proxies' in sys.argv:
proxies = urllib.request.getproxies()
else:
old_getproxies = urllib.request.getproxies
def new(*n, **kw):
import traceback
traceback.print_stack()
return old_getproxies(*n, **kw)
urllib.request.getproxies = new
macos_proxies_crash_fix()