From cec3742f9c4e226c53499ebe77c688534fbea4f7 Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Mon, 28 Feb 2022 21:57:36 +0100 Subject: [PATCH] prepare v1.7.0 --- custom/config.json | 2 +- pfruck_contabo/__init__.py | 2 +- pfruck_contabo/api_client.py | 9 ++++----- pfruck_contabo/configuration.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/custom/config.json b/custom/config.json index ffda4d1..91c4d53 100644 --- a/custom/config.json +++ b/custom/config.json @@ -2,5 +2,5 @@ "packageName": "pfruck_contabo", "projectName": "pfruck_contabo", "packageUrl": "https://github.com/p-fruck/python-contabo", - "packageVersion": "1.6.0" + "packageVersion": "1.7.0" } diff --git a/pfruck_contabo/__init__.py b/pfruck_contabo/__init__.py index 58cd435..6fcd244 100644 --- a/pfruck_contabo/__init__.py +++ b/pfruck_contabo/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "1.6.0" +__version__ = "1.7.0" # import ApiClient from pfruck_contabo.api_client import ApiClient diff --git a/pfruck_contabo/api_client.py b/pfruck_contabo/api_client.py index 21a21ce..6d668a4 100644 --- a/pfruck_contabo/api_client.py +++ b/pfruck_contabo/api_client.py @@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.6.0/python' + self.user_agent = 'OpenAPI-Generator/1.7.0/python' def __enter__(self): return self @@ -582,7 +582,7 @@ def select_header_content_type(self, content_types, method=None, body=None): :return: Content-Type (e.g. application/json). """ if not content_types: - return None + return 'application/json' content_types = [x.lower() for x in content_types] @@ -842,11 +842,10 @@ def call_with_http_info(self, **kwargs): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: if params['body'] != "": - content_types_list = self.api_client.select_header_content_type( + header_list = self.api_client.select_header_content_type( content_type_headers_list, self.settings['http_method'], params['body']) - if content_types_list: - params['header']['Content-Type'] = content_types_list + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/pfruck_contabo/configuration.py b/pfruck_contabo/configuration.py index e3eb365..b59d86c 100644 --- a/pfruck_contabo/configuration.py +++ b/pfruck_contabo/configuration.py @@ -389,7 +389,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.6.0".\ + "SDK Package Version: 1.7.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index d28caba..e95bbee 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "pfruck_contabo" -VERSION = "1.6.0" +VERSION = "1.7.0" # To install the library, run the following # # python setup.py install