diff options
Diffstat (limited to 'scripts/nb.py')
-rw-r--r-- | scripts/nb.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/nb.py b/scripts/nb.py index d00b0d2..6afb74e 100644 --- a/scripts/nb.py +++ b/scripts/nb.py @@ -2,7 +2,6 @@ """ Get exchange rates from nb """ import csv -import os import sys import tempfile from datetime import datetime, timedelta @@ -14,8 +13,8 @@ from tzlocal import get_localzone # I'm not sure I understand Norges Banks json-model. It seems a lot easier to just get the CSV, and convert it to JSON. apiUrl = "https://data.norges-bank.no/api/data/EXR/B.EUR.NOK.SP?format=csv&locale=en" -pg_db = os.environ["el_pg_db"] -pg_host = os.environ["el_pg_host"] +pg_db = common.env("el_pg_db") +pg_host = common.env("el_pg_host") pg_table = "nbex" startTime = datetime.now(get_localzone()) - timedelta(days=10) |