From af1ba1e191e42c00c7bec80a74cd06ebcdd756d3 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Mon, 4 Jun 2018 12:58:35 +0300 Subject: [PATCH] split ugly ternary to regular if --- scripts/download_backtest_data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/download_backtest_data.py b/scripts/download_backtest_data.py index cd64f36bb..18a543c4e 100755 --- a/scripts/download_backtest_data.py +++ b/scripts/download_backtest_data.py @@ -16,8 +16,10 @@ args = arguments.parse_args() TICKER_INTERVALS = ['1m', '5m'] -dl_path = args.export if args.export and os.path.exists(args.export) \ - else os.path.join(DEFAULT_DL_PATH, args.exchange) +dl_path = os.path.join(DEFAULT_DL_PATH, args.exchange) +if args.export: + dl_path = args.export + if not os.path.isdir(dl_path): sys.exit(f'Directory {dl_path} does not exist.')