Error handling for end date before start date.
This commit is contained in:
parent
7d473c7dba
commit
0927e27939
1 changed files with 5 additions and 0 deletions
|
@ -47,6 +47,11 @@ def cli(args=None, output_file=sys.stdout):
|
|||
else:
|
||||
start = source.start()
|
||||
logging.info(f"Using the source default start date of {start}.")
|
||||
if args.end < start:
|
||||
logging.critical(
|
||||
f"The end date '{args.end}' preceeds the start date '{start}'!"
|
||||
)
|
||||
sys.exit(1)
|
||||
series = Series(
|
||||
base=args.pair[0],
|
||||
quote=args.pair[1],
|
||||
|
|
Loading…
Add table
Reference in a new issue