From ab15074ae42398f8099c4d2fa5cef53e8d78304b Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 5 Nov 2016 14:10:26 -0400 Subject: [PATCH 1/2] fix --wallet=lbrycrd argument --- lbrynet/lbrynet_daemon/DaemonControl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbrynet/lbrynet_daemon/DaemonControl.py b/lbrynet/lbrynet_daemon/DaemonControl.py index 0c3575ab1..f16728fa4 100644 --- a/lbrynet/lbrynet_daemon/DaemonControl.py +++ b/lbrynet/lbrynet_daemon/DaemonControl.py @@ -115,7 +115,7 @@ def update_settings_from_args(args): if args.branch: to_pass['ui_branch'] = args.branch to_pass['use_auth_http'] = args.useauth - to_pass['wallet_type'] = args.wallet + to_pass['wallet'] = args.wallet settings.update(to_pass) From 297865902b1b14b712355e1cd01783e0788c5cce Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 5 Nov 2016 14:23:48 -0400 Subject: [PATCH 2/2] use json conf file if not given yml --- lbrynet/conf.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 807f3cb0e..c69b640f8 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -266,7 +266,7 @@ class Config(DefaultSettings): return os.path.join(self.ensure_data_dir(), self.LOG_FILE_NAME) def get_conf_filename(self): - return os.path.join(self.ensure_data_dir(), "daemon_settings.yml") + return get_settings_file_ext(self.ensure_data_dir()) def update_settings_from_file(filename=None): @@ -279,6 +279,17 @@ def update_settings_from_file(filename=None): log.info('%s: Failed to update settings from %s', ex, filename) +def get_settings_file_ext(data_dir): + yml_path = os.path.join(data_dir, "daemon_settings.yml") + json_path = os.path.join(data_dir, "daemon_settings.json") + if os.path.isfile(yml_path): + return yml_path + elif os.path.isfile(json_path): + return json_path + else: + return yml_path + + settings_decoders = { '.json': json.loads, '.yml': yaml.load