From a1bcac99cc718a23916b94516e8814f41c24c625 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sun, 26 Dec 2021 16:46:43 +0000 Subject: [PATCH] Fix tumble log dir after load_program_config Fixes #1060. Prior to this commit, the extra log for tumbler.py was created in the local directory, because it was set before running load_program_config (which defaults to the user's default joinmarket config location), this is now corrected. --- scripts/tumbler.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/tumbler.py b/scripts/tumbler.py index 892f7e5..9a264ae 100755 --- a/scripts/tumbler.py +++ b/scripts/tumbler.py @@ -17,12 +17,8 @@ from jmbase.support import get_log, jmprint, EXIT_SUCCESS, \ EXIT_FAILURE, EXIT_ARGERROR log = get_log() -logsdir = os.path.join(os.path.dirname( - jm_single().config_location), "logs") - def main(): - tumble_log = get_tumble_log(logsdir) (options, args) = get_tumbler_parser().parse_args() options_org = options options = vars(options) @@ -30,6 +26,9 @@ def main(): jmprint('Error: Needs a wallet file', "error") sys.exit(EXIT_ARGERROR) load_program_config(config_path=options['datadir']) + logsdir = os.path.join(os.path.dirname( + jm_single().config_location), "logs") + tumble_log = get_tumble_log(logsdir) if jm_single().bc_interface is None: jmprint('Error: Needs a blockchain source', "error")