Treat BaseException as over-general (#29573)
To follow pylint's defaults.
This commit is contained in:
parent
31c71989e9
commit
fb66a6cf81
2 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"WHOIS lookup for %s didn't contain an expiration date", domain
|
"WHOIS lookup for %s didn't contain an expiration date", domain
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except whois.BaseException as ex:
|
except whois.BaseException as ex: # pylint: disable=broad-except
|
||||||
_LOGGER.error("Exception %s occurred during WHOIS lookup for %s", ex, domain)
|
_LOGGER.error("Exception %s occurred during WHOIS lookup for %s", ex, domain)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class WhoisSensor(Entity):
|
||||||
"""Get the current WHOIS data for the domain."""
|
"""Get the current WHOIS data for the domain."""
|
||||||
try:
|
try:
|
||||||
response = self.whois(self._domain)
|
response = self.whois(self._domain)
|
||||||
except whois.BaseException as ex:
|
except whois.BaseException as ex: # pylint: disable=broad-except
|
||||||
_LOGGER.error("Exception %s occurred during WHOIS lookup", ex)
|
_LOGGER.error("Exception %s occurred during WHOIS lookup", ex)
|
||||||
self._empty_state_and_attributes()
|
self._empty_state_and_attributes()
|
||||||
return
|
return
|
||||||
|
|
2
pylintrc
2
pylintrc
|
@ -64,4 +64,4 @@ ignored-classes=_CountingAttr
|
||||||
expected-line-ending-format=LF
|
expected-line-ending-format=LF
|
||||||
|
|
||||||
[EXCEPTIONS]
|
[EXCEPTIONS]
|
||||||
overgeneral-exceptions=Exception,HomeAssistantError
|
overgeneral-exceptions=BaseException,Exception,HomeAssistantError
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue