From 9ac6040110e47ddad22e3616f0ecab3895bb4b4b Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Wed, 8 Apr 2020 12:17:41 +0200 Subject: [PATCH] Remove unused version parameter in version header function The logic to determine the version when getting the ironic version header is not influenced by the version parameter passed to the function. Change-Id: Ie52a82bf71a2277cea11fd2dedfd9c1e0001d95f --- ironic_python_agent/ironic_api_client.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ironic_python_agent/ironic_api_client.py b/ironic_python_agent/ironic_api_client.py index 9217710c4..dd94998cb 100644 --- a/ironic_python_agent/ironic_api_client.py +++ b/ironic_python_agent/ironic_api_client.py @@ -78,7 +78,7 @@ class APIClient(object): cert=cert, **kwargs) - def _get_ironic_api_version_header(self, version=MIN_IRONIC_VERSION): + def _get_ironic_api_version_header(self): # TODO(TheJulia): It would be great to improve version handling # logic, but we need to ship a newer version if we can. ironic_version = "%d.%d" % self._get_ironic_api_version() @@ -117,10 +117,8 @@ class APIClient(object): if api_ver >= AGENT_VERSION_IRONIC_VERSION: data['agent_version'] = version.version_info.release_string() - headers = self._get_ironic_api_version_header( - AGENT_VERSION_IRONIC_VERSION) - else: - headers = self._get_ironic_api_version_header() + + headers = self._get_ironic_api_version_header() try: response = self._request('POST', path, data=data, headers=headers)