commit cda3f603bdd43d10f693209a41f243ab6082d06d
parent 91f8bb7d0b22c0c59207e5c80c4d669fa359cf42
Author: thomasv <thomasv@gitorious>
Date: Mon, 5 Nov 2012 14:02:28 +0100
default_wallet_file configuration string
Diffstat:
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/lib/simple_config.py b/lib/simple_config.py
@@ -30,15 +30,6 @@ class SimpleConfig:
def __init__(self, options=None):
- self.wallet_config = {}
- if options:
- # this will call read_wallet_config only if there is a wallet_path value in options
- try:
- self.read_wallet_config(options.wallet_path)
- except:
- pass
-
-
# system conf, readonly
self.system_config = {}
self.read_system_config()
@@ -53,6 +44,23 @@ class SimpleConfig:
if options.server: self.options_config['server'] = options.server
if options.proxy: self.options_config['proxy'] = options.proxy
if options.gui: self.options_config['gui'] = options.gui
+
+
+ self.wallet_config = {}
+ self.wallet_file_exists = False
+ path = None
+ if options:
+ # this will call read_wallet_config only if there is a wallet_path value in options
+ try:
+ path = options.wallet_path
+ except:
+ pass
+ if not path:
+ path = self.get('default_wallet_path')
+ print "path", path
+ if path:
+ self.read_wallet_config(path)
+
@@ -191,7 +199,6 @@ class SimpleConfig:
def read_wallet_config(self, path):
"""Read the contents of the wallet file."""
- self.wallet_file_exists = False
self.init_path(path)
try:
with open(self.path, "r") as f: