mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #11573/f9e583da backport][stable-12] fix: remove HTTPStatus constructs introduced in Python 3.11 (#11575)
fix: remove HTTPStatus constructs introduced in Python 3.11 (#11573)
* fix: remove HTTPStatus constructs introduced in Python 3.11
* add changelog frag
(cherry picked from commit f9e583dae2)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -83,7 +83,7 @@ def api_request(
|
||||
return None, info
|
||||
elif _status == HTTPStatus.CONFLICT:
|
||||
module.fail_json(msg="Job executions limit reached", execution_info=json.loads(info["body"]))
|
||||
elif _status.is_server_error:
|
||||
elif _status >= HTTPStatus.INTERNAL_SERVER_ERROR: # 5xx errors
|
||||
module.fail_json(msg="Rundeck API error", execution_info=json.loads(info["body"]))
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user