support for payment requests in the gui
[electrum-nvc.git] / lib / simple_config.py
index a57747d..127b480 100644 (file)
@@ -22,24 +22,28 @@ a SimpleConfig instance then reads the wallet file.
         if options.get('portable') is not True:
             self.read_system_config()
 
+        # command-line options
+        self.options_config = options
+
         # init path
         self.init_path()
 
         # user conf, writeable
         self.user_config = {}
-        if options.get('portable') == False:
-            self.read_user_config()
+        self.read_user_config()
 
-        # command-line options
-        self.options_config = options
 
 
 
 
     def init_path(self):
 
+        # Read electrum path in the command line configuration
+        self.path = self.options_config.get('electrum_path')
+
         # Read electrum path in the system configuration
-        self.path = self.system_config.get('electrum_path')
+        if self.path is None:
+            self.path = self.system_config.get('electrum_path')
 
         # If not set, use the user's default data directory.
         if self.path is None:
@@ -98,7 +102,7 @@ a SimpleConfig instance then reads the wallet file.
             import ast
             try:
                 out = ast.literal_eval(out)
-            except:
+            except Exception:
                 print "type error for '%s': using default value"%key
                 out = default
 
@@ -149,7 +153,7 @@ a SimpleConfig instance then reads the wallet file.
                 return
             try:
                 d = ast.literal_eval( data )  #parse raw data from reading wallet file
-            except:
+            except Exception:
                 raise IOError("Cannot read config file.")
 
             self.user_config = d