default_wallet_file configuration string
This commit is contained in:
parent
91f8bb7d0b
commit
cda3f603bd
|
@ -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()
|
||||
|
@ -55,6 +46,23 @@ class SimpleConfig:
|
|||
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)
|
||||
|
||||
|
||||
|
||||
|
||||
def set_key(self, key, value, save = False):
|
||||
# find where a setting comes from and save it there
|
||||
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue