mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 20:25:07 +02:00
Handle stacktrace when rtorrent host is unreachable (#24541)
This commit is contained in:
committed by
Paulus Schoutsen
parent
616301f7ee
commit
6b3c740dc3
@@ -99,8 +99,9 @@ class RTorrentSensor(Entity):
|
|||||||
try:
|
try:
|
||||||
self.data = multicall()
|
self.data = multicall()
|
||||||
self._available = True
|
self._available = True
|
||||||
except (xmlrpc.client.ProtocolError, ConnectionRefusedError):
|
except (xmlrpc.client.ProtocolError,
|
||||||
_LOGGER.error("Connection to rtorrent lost")
|
ConnectionRefusedError, OSError) as ex:
|
||||||
|
_LOGGER.error("Connection to rtorrent failed (%s)", ex)
|
||||||
self._available = False
|
self._available = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user