Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
3742f175ad
commit
c820dd4cb5
107 changed files with 243 additions and 157 deletions
|
@ -515,11 +515,13 @@ class HomeAssistant:
|
|||
if self.state == CoreState.not_running: # just ignore
|
||||
return
|
||||
if self.state in [CoreState.stopping, CoreState.final_write]:
|
||||
_LOGGER.info("async_stop called twice: ignored")
|
||||
_LOGGER.info("Additional call to async_stop was ignored")
|
||||
return
|
||||
if self.state == CoreState.starting:
|
||||
# This may not work
|
||||
_LOGGER.warning("async_stop called before startup is complete")
|
||||
_LOGGER.warning(
|
||||
"Stopping Home Assistant before startup has completed may fail"
|
||||
)
|
||||
|
||||
# stage 1
|
||||
self.state = CoreState.stopping
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue