mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
default_wallet_file configuration string
This commit is contained in:
parent
91f8bb7d0b
commit
cda3f603bd
1 changed files with 17 additions and 10 deletions
|
@ -30,15 +30,6 @@ class SimpleConfig:
|
||||||
|
|
||||||
def __init__(self, options=None):
|
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
|
# system conf, readonly
|
||||||
self.system_config = {}
|
self.system_config = {}
|
||||||
self.read_system_config()
|
self.read_system_config()
|
||||||
|
@ -53,6 +44,23 @@ class SimpleConfig:
|
||||||
if options.server: self.options_config['server'] = options.server
|
if options.server: self.options_config['server'] = options.server
|
||||||
if options.proxy: self.options_config['proxy'] = options.proxy
|
if options.proxy: self.options_config['proxy'] = options.proxy
|
||||||
if options.gui: self.options_config['gui'] = options.gui
|
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):
|
def read_wallet_config(self, path):
|
||||||
"""Read the contents of the wallet file."""
|
"""Read the contents of the wallet file."""
|
||||||
self.wallet_file_exists = False
|
|
||||||
self.init_path(path)
|
self.init_path(path)
|
||||||
try:
|
try:
|
||||||
with open(self.path, "r") as f:
|
with open(self.path, "r") as f:
|
||||||
|
|
Loading…
Add table
Reference in a new issue