1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00

Fix waiting for setup that never happens (#14346)

This commit is contained in:
Lukas Barth 2018-05-12 10:30:21 +02:00 committed by GitHub
parent 304137e7ff
commit b903bbc042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,9 +114,6 @@ class MatrixBot(object):
self._listening_rooms = listening_rooms
# Logging in is deferred b/c it does I/O
self._setup_done = False
# We have to fetch the aliases for every room to make sure we don't
# join it twice by accident. However, fetching aliases is costly,
# so we only do it once per room.
@ -343,9 +340,5 @@ class MatrixBot(object):
def handle_send_message(self, service):
"""Handle the send_message service."""
if not self._setup_done:
_LOGGER.warning("Could not send message: setup is not done!")
return
self._send_message(service.data[ATTR_MESSAGE],
service.data[ATTR_TARGET])