Skip to content

Commit

Permalink
importer: etf2l: Fix since argument parsing
Browse files Browse the repository at this point in the history
We expect values of since to be datetimes.

Fixes: 481a320 ("Support importing ETF2L matches")
Signed-off-by: Sean Anderson <[email protected]>
  • Loading branch information
Forty-Bot committed Apr 13, 2024
1 parent e068c83 commit 72995d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trends/importer/etf2l.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (C) 2022 Sean Anderson <[email protected]>

from datetime import datetime
from dateutil import tz
import re
import json
import logging
Expand Down Expand Up @@ -136,7 +137,7 @@ def create_etf2l_parser(sub):
b = etf2l_sub.add_parser("bulk", help="Bulk import from etf2ls.tf")
b.set_defaults(fetcher=ETF2LBulkFetcher)
b.add_argument("-s", "--since", type=datetime.fromisoformat,
default=0, metavar="DATE",
default=datetime.fromtimestamp(0, tz.UTC), metavar="DATE",
help="Only fetch matches created since DATE")
b.add_argument("-N", "--new", action='store_true',
help="Only fetch matches created since the newest imported etf2l")
Expand Down

0 comments on commit 72995d2

Please sign in to comment.