[issue15769] urllib.request.urlopen with cafile or capath set overrides any previous Handlers

Antoine Pitrou report at bugs.python.org
Thu Aug 23 14:57:53 CEST 2012


Antoine Pitrou added the comment:

-        opener = build_opener(https_handler)
+        if _opener is None:
+            opener = build_opener(https_handler)
+        else:
+            opener = _opener
+            opener.add_handler(https_handler)

Well, isn't it a bad idea to mutate the global opener?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15769>
_______________________________________


More information about the Python-bugs-list mailing list