diff --git a/redshift_connector/core.py b/redshift_connector/core.py index 3c12530..b9f557d 100644 --- a/redshift_connector/core.py +++ b/redshift_connector/core.py @@ -626,7 +626,7 @@ def get_calling_module() -> str: raise ProgrammingError("one of host or unix_sock must be provided") if timeout is not None: _logger.debug("set socket timeout=%s", timeout) - self._usock.settimeout(timeout) + self._usock.settimeout(int(timeout)) if unix_sock is None and host is not None: hostport: typing.Tuple[str, int] = Connection.__get_host_address_info(host, port) diff --git a/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py b/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py index 4ee62c0..cb5c435 100644 --- a/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py +++ b/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py @@ -68,7 +68,7 @@ def check_required_parameters(self: "BrowserAzureOAuth2CredentialsProvider") -> BrowserAzureOAuth2CredentialsProvider.handle_missing_required_property("idp_tenant") if not self.client_id: BrowserAzureOAuth2CredentialsProvider.handle_missing_required_property("client_id") - if not self.idp_response_timeout or self.idp_response_timeout < 10: + if not self.idp_response_timeout or int(self.idp_response_timeout) < 10: BrowserAzureOAuth2CredentialsProvider.handle_invalid_property_value( "idp_response_timeout", "Must be 10 seconds or greater" )