URI: 
       tmove proxy fallback away from send method - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit da9351260c68b6ce6cf0685ce5ebb85e34bd1cb4
   DIR parent c1fa13d0f64d85cf030ca65dff0a8c9eb369a7b5
  HTML Author: thomasv <thomasv@gitorious>
       Date:   Wed, 10 Oct 2012 10:16:18 +0200
       
       move proxy fallback away from send method
       
       Diffstat:
         M lib/interface.py                    |       7 -------
         M lib/simple_config.py                |       5 ++++-
       
       2 files changed, 4 insertions(+), 8 deletions(-)
       ---
   DIR diff --git a/lib/interface.py b/lib/interface.py
       t@@ -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)
        
   DIR diff --git a/lib/simple_config.py b/lib/simple_config.py
       t@@ -4,7 +4,6 @@ from util import user_dir
        
        class SimpleConfig:
        
       -
            default_options = {
                "gui": "lite",
                "proxy": None,
       t@@ -26,6 +25,10 @@ class SimpleConfig:
                        os.mkdir(self.config_folder)
                    self.save_config()
        
       +        # This is a friendly fallback to the old style default proxy options
       +        if(self.config.get("proxy") is not None and self.config["proxy"]["mode"] == "none"):
       +            self.set_key("proxy", None, True)
       +
            def set_key(self, key, value, save = True):
                self.config[key] = value
                if save == True: