OwnTracks: Fix handler is None checking (#9794)

* OwnTracks: Fix handler is None checking

* Update owntracks.py
This commit is contained in:
Paulus Schoutsen 2017-10-10 01:39:25 -07:00 committed by Fabian Affolter
parent e144b0f0f9
commit fc47e9443b

View File

@ -407,7 +407,8 @@ def async_handle_message(hass, context, message):
handler = HANDLERS.get(msgtype) handler = HANDLERS.get(msgtype)
if handler is None: if handler is None:
error = 'Received unsupported message type: {}.'.format(msgtype) _LOGGER.warning(
_LOGGER.warning(error) 'Received unsupported message type: %s.', msgtype)
return
yield from handler(hass, context, message) yield from handler(hass, context, message)