From c0c480309f56cedbd4614e33787f0fd702b98326 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Tue, 28 Jul 2015 16:52:17 -0400 Subject: [PATCH] Properly handle HTTPS detection vis a vis command-line and config file arguments --- blockstore/lib/blockdaemon.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/blockstore/lib/blockdaemon.py b/blockstore/lib/blockdaemon.py index 67ba524d8..e7f5dc29d 100644 --- a/blockstore/lib/blockdaemon.py +++ b/blockstore/lib/blockdaemon.py @@ -313,14 +313,18 @@ def parse_bitcoind_args( return_parser=False, parser=None ): args, _ = parser.parse_known_args() # propagate options - for (argname, config_name) in zip( ["bitcoind_server", "bitcoind_port", "bitcoind_user", "bitcoind_passwd", "bitcoind_use_https"], \ - ["BITCOIND_SERVER", "BITCOIND_PORT", "BITCOIND_USER", "BITCOIND_PASSWD", "BITCOIND_USE_HTTPS"] ): + for (argname, config_name) in zip( ["bitcoind_server", "bitcoind_port", "bitcoind_user", "bitcoind_passwd"], \ + ["BITCOIND_SERVER", "BITCOIND_PORT", "BITCOIND_USER", "BITCOIND_PASSWD"] ): if hasattr( args, argname ) and getattr( args, argname ) is not None: opts[ argname ] = getattr( args, argname ) setattr( config, config_name, getattr( args, argname ) ) - + + if args.bitcoind_use_https: + config.BITCOIND_USE_HTTPS = True + opts['bitcoind_use_https'] = True + if return_parser: return opts, parser else: