Remove unused code

This commit is contained in:
Edward Betts 2023-10-02 23:39:37 +01:00
parent 1903312aab
commit e8a6509c73

View file

@ -52,7 +52,6 @@ now = datetime.now()
today = now.date()
now_str = now.strftime("%Y-%m-%d_%H:%M")
now_utc = datetime.now(timezone.utc)
do_refresh = len(sys.argv) > 1 and sys.argv[1] == "--refresh"
next_us_presidential_election = date(2024, 11, 5)
next_uk_general_election = date(2024, 5, 2)
@ -105,7 +104,7 @@ def get_gbpusd() -> Decimal:
recent = datetime.strptime(recent_filename, "%Y-%m-%d_%H:%M_GBPUSD.json")
delta = now - recent
if not do_refresh and existing and delta < timedelta(hours=6):
if existing and delta < timedelta(hours=6):
full = os.path.join(fx_dir, recent_filename)
data = json.load(open(full), parse_float=Decimal)
if "quotes" in data and "USDGBP" in data["quotes"]: