Skip to content

Commit

Permalink
added request timeout to API
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaae committed May 8, 2023
1 parent d76d27f commit df65464
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/portainer/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def query(
headers=headers,
params=params,
verify=self._ssl_verify,
timeout=10,
)

elif method == "post":
Expand All @@ -92,6 +93,7 @@ def query(
headers=headers,
json=params,
verify=self._ssl_verify,
timeout=10,
)

if response.status_code == 200:
Expand Down

0 comments on commit df65464

Please sign in to comment.