aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/elvia_gridtariff.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-02-01 20:59:42 +0100
committerDennis Eriksen <d@ennis.no>2023-02-01 20:59:42 +0100
commit7c403ecc8b6bd31f447eb91d73d95055489fbac4 (patch)
treef70a96871178c0d78be505cc71f090e4e91857ea /scripts/elvia_gridtariff.py
parentmoving and renaming/breaking everything (diff)
downloadenergyscripts-7c403ecc8b6bd31f447eb91d73d95055489fbac4.tar.gz
fixing some lintingthings
Diffstat (limited to 'scripts/elvia_gridtariff.py')
-rw-r--r--scripts/elvia_gridtariff.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/elvia_gridtariff.py b/scripts/elvia_gridtariff.py
index bcf4bd7..28810b2 100644
--- a/scripts/elvia_gridtariff.py
+++ b/scripts/elvia_gridtariff.py
@@ -5,8 +5,8 @@ import os
import sys
from datetime import datetime
from datetime import timedelta
-import requests
from tzlocal import get_localzone
+import requests
from common import dbi
@@ -45,13 +45,13 @@ try:
'meteringPointIds': [ meteringPointId ]
}
- response = requests.post(url, headers=hdr, json=body)
+ response = requests.post(url, headers=hdr, json=body, timeout=10)
if response.status_code != 200:
print(response.status_code)
print("Oh shit")
response.raise_for_status()
-except Exception as e:
+except requests.exceptions.RequestException as e:
print("oh lol")
sys.exit(e)