1
0

move proxy fallback away from send method

This commit is contained in:
thomasv
2012-10-10 10:16:18 +02:00
parent c1fa13d0f6
commit da9351260c
2 changed files with 4 additions and 8 deletions

View File

@@ -190,14 +190,7 @@ class HttpStratumInterface(PollingInterface):
import urllib2, json, time, cookielib
if self.proxy:
# This is a friendly fallback to the old style default proxy options
if(self.proxy["mode"] == "none"):
simple_config = SimpleConfig()
simple_config.set_key("proxy", None, True)
return
import socks
socks.setdefaultproxy(proxy_modes.index(self.proxy["mode"]), self.proxy["host"], int(self.proxy["port"]) )
socks.wrapmodule(urllib2)