Skip to content

Commit

Permalink
added timeout to requests.delete()
Browse files Browse the repository at this point in the history
  • Loading branch information
nh916 committed Aug 31, 2023
1 parent caea71f commit 3544320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cript/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ def delete(self, node) -> None:

delete_node_api_url: str = f"{self._host}/{node.node_type_snake_case}/{node.uuid}/"

response: Dict = requests.delete(headers=self._http_headers, url=delete_node_api_url).json()
response: Dict = requests.delete(headers=self._http_headers, url=delete_node_api_url, timeout=_API_TIMEOUT).json()

if response["code"] != 200:
raise APIError(api_error=str(response), http_method="DELETE", api_url=delete_node_api_url)
Expand Down

0 comments on commit 3544320

Please sign in to comment.