Skip to content

Commit

Permalink
Use logger for backtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
OnFreund committed Apr 10, 2024
1 parent 3fa5528 commit a2da236
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions homeassistant/components/risco/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from dataclasses import dataclass, field
from datetime import timedelta
import logging
import traceback
from typing import Any

from pyrisco import (
Expand Down Expand Up @@ -102,8 +101,7 @@ async def _async_setup_local_entry(hass: HomeAssistant, entry: ConfigEntry) -> b
return False

async def _error(error: Exception) -> None:
tb = traceback.format_exception(error)
_LOGGER.error("Error in Risco library:\n %s", "".join(tb))
_LOGGER.error("Error in Risco library", exc_info=error)

Check warning on line 104 in homeassistant/components/risco/__init__.py

View check run for this annotation

Codecov / codecov/patch

homeassistant/components/risco/__init__.py#L104

Added line #L104 was not covered by tests

entry.async_on_unload(risco.add_error_handler(_error))

Expand Down

0 comments on commit a2da236

Please sign in to comment.