Update homeassistant/bootstrap.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Abílio Costa
2025-08-01 19:42:09 +01:00
committed by GitHub
parent 1d717f671b
commit 0afca48069

View File

@@ -623,7 +623,7 @@ async def async_enable_logging(
default_log_path = hass.config.path(ERROR_LOG_FILENAME) default_log_path = hass.config.path(ERROR_LOG_FILENAME)
if "SUPERVISOR" in os.environ: if "SUPERVISOR" in os.environ:
_LOGGER.info("Running in Supervisor, not logging to file") _LOGGER.info("Running in Supervisor, not logging to file")
# Delete the default log file if it exists, since previous versions created # Rename the default log file if it exists, since previous versions created
# it even on Supervisor # it even on Supervisor
if os.path.isfile(default_log_path): if os.path.isfile(default_log_path):
with contextlib.suppress(OSError): with contextlib.suppress(OSError):