From 38b7c80217c4e72b1d8988eb1e60bb6e77334114 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 18 Apr 2024 07:52:22 +0200 Subject: Adding upstream version 9.4.0+dfsg. Signed-off-by: Daniel Baumann --- ansible_collections/splunk/es/plugins/httpapi/splunk.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ansible_collections/splunk/es/plugins/httpapi/splunk.py') diff --git a/ansible_collections/splunk/es/plugins/httpapi/splunk.py b/ansible_collections/splunk/es/plugins/httpapi/splunk.py index 91f079e06..095a7b71c 100644 --- a/ansible_collections/splunk/es/plugins/httpapi/splunk.py +++ b/ansible_collections/splunk/es/plugins/httpapi/splunk.py @@ -3,6 +3,7 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type DOCUMENTATION = """ @@ -18,13 +19,12 @@ version_added: "1.0.0" import json -from ansible.module_utils.basic import to_text from ansible.errors import AnsibleConnectionFailure -from ansible.module_utils.six.moves.urllib.error import HTTPError -from ansible_collections.ansible.netcommon.plugins.plugin_utils.httpapi_base import ( - HttpApiBase, -) +from ansible.module_utils.basic import to_text from ansible.module_utils.connection import ConnectionError +from ansible.module_utils.six.moves.urllib.error import HTTPError +from ansible_collections.ansible.netcommon.plugins.plugin_utils.httpapi_base import HttpApiBase + BASE_HEADERS = {"Content-Type": "application/json"} @@ -47,7 +47,8 @@ class HttpApi(HttpApiBase): return response.getcode(), self._response_to_json(value) except AnsibleConnectionFailure as e: self.connection.queue_message( - "vvv", "AnsibleConnectionFailure: %s" % e + "vvv", + "AnsibleConnectionFailure: %s" % e, ) if to_text("Could not connect to") in to_text(e): raise @@ -62,8 +63,7 @@ class HttpApi(HttpApiBase): def _display_request(self, request_method, path): self.connection.queue_message( "vvvv", - "Web Services: %s %s/%s" - % (request_method, self.connection._url, path), + "Web Services: %s %s/%s" % (request_method, self.connection._url, path), ) def _get_response_value(self, response_data): -- cgit v1.2.3