Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-09-22 12:41:44 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-09-22 12:41:44 (GMT)
commitebaebc675d47fe488751ae73161e93c614066329 (patch)
tree2430345003dc6b5cbcb2e96df482638e6d5b1524
parent8744eb15ce9afe71899e4ca9918129b60adbcfda (diff)
Monkey patch SSL code to not fail on https:// requests
-rw-r--r--sugar_network/toolkit/http.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sugar_network/toolkit/http.py b/sugar_network/toolkit/http.py
index 5e37acb..c3372c1 100644
--- a/sugar_network/toolkit/http.py
+++ b/sugar_network/toolkit/http.py
@@ -36,9 +36,10 @@ from sugar_network import local
from active_toolkit import enforce
# Let toolkit.http work in concurrence
-# TODO Is it safe for the rest of code?
-from gevent.monkey import patch_socket
-patch_socket(dns=False)
+from gevent import monkey
+# XXX No DNS because `toolkit.network.res_init()` doesn't work otherwise
+monkey.patch_socket(dns=False)
+monkey.patch_ssl()
_logger = logging.getLogger('http')