Replace pylint broad-except with Ruff BLE001 (#116250)

This commit is contained in:
Sid 2024-05-07 14:00:27 +02:00 committed by GitHub
parent b35fbd8d20
commit 2cc916db6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
335 changed files with 459 additions and 459 deletions

View file

@ -476,7 +476,7 @@ class HomekitControllerFlowHandler(ConfigFlow, domain=DOMAIN):
return self.async_abort(reason="accessory_not_found_error")
except InsecureSetupCode:
errors["pairing_code"] = "insecure_setup_code"
except Exception as err: # pylint: disable=broad-except
except Exception as err:
_LOGGER.exception("Pairing attempt failed with an unhandled exception")
self.finish_pairing = None
errors["pairing_code"] = "pairing_failed"
@ -508,7 +508,7 @@ class HomekitControllerFlowHandler(ConfigFlow, domain=DOMAIN):
# TLV error, usually not in pairing mode
_LOGGER.exception("Pairing communication failed")
return await self.async_step_protocol_error()
except Exception as err: # pylint: disable=broad-except
except Exception as err:
_LOGGER.exception("Pairing attempt failed with an unhandled exception")
errors["pairing_code"] = "pairing_failed"
description_placeholders["error"] = str(err)