Skip to content

Commit

Permalink
add timeout to token request
Browse files Browse the repository at this point in the history
  • Loading branch information
elpablete committed Feb 27, 2024
1 parent 4c04902 commit 8757ecd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/enerbitdso/enerbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ScheduleMeasurementRecord(pydantic.BaseModel):
def get_auth_token(base_url, username, password):
path = "/auth/token/"
data = {"username": username, "password": password}
with httpx.Client(base_url=base_url) as client:
with httpx.Client(base_url=base_url, timeout=TIMEOUT) as client:
response = client.post(path, data=data)
response.raise_for_status()
token = response.json()["access_token"]
Expand Down

0 comments on commit 8757ecd

Please sign in to comment.