Fix cert expiry config flow check and update #26638
async def _test_connection(self, user_input): """Test connection to the server and try to get the certificate.""" try: await self.hass.async_add_executor_job( get_cert, user_input[CONF_HOST], user_input.get(CONF_PORT, DEFAULT_PORT)) return True except socket.gaierror: self._errors[CONF_HOST] = "resolve_failed" except socket.timeout: self._errors[CONF_HOST] = "connection_timeout" except OSError: self._errors[CONF_HOST] = "certificate_fetch_failed" return False
if await self._test_connection(user_input):
i was trying something like that but it did not work ...
@MartinHjelmare what would be the problem with the CI for python 2.6?
balloob merged commit
Sep 17, 2019
9 checks passed
9 checks passed
CI Build #20190917.74 succeededDetails
CI (FullCheck Mypy) FullCheck Mypy succeededDetails
CI (FullCheck Pylint) FullCheck Pylint succeededDetails
CI (Overview CheckFormat) Overview CheckFormat succeededDetails
CI (Overview Lint) Overview Lint succeededDetails
CI (Overview Validate) Overview Validate succeededDetails
CI (Tests PyTest Python36) Tests PyTest Python36 succeededDetails
CI (Tests PyTest Python37) Tests PyTest Python37 succeededDetails
cla-bot Everyone involved has signed the CLA
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews.