make --pairs-file required

This commit is contained in:
Janne Sinivirta 2018-06-04 11:47:27 +03:00
parent 4b8f382cfd
commit a0c79bd727
2 changed files with 3 additions and 5 deletions

View File

@ -291,6 +291,7 @@ class Arguments(object):
'--pairs-file',
help='File containing a list of pairs to download',
dest='pairs_file',
required=True,
default=None
)

View File

@ -15,12 +15,9 @@ arguments.testdata_dl_options()
args = arguments.parse_args()
TICKER_INTERVALS = ['1m', '5m']
PAIRS = []
if args.pairs_file:
with open(args.pairs_file) as file:
PAIRS = json.load(file)
PAIRS = list(set(PAIRS))
with open(args.pairs_file) as file:
PAIRS = list(set(json.load(file)))
dl_path = DEFAULT_DL_PATH
if args.export and os.path.exists(args.export):