OwnTracks: Fix handler is None checking (#9794)

* OwnTracks: Fix handler is None checking

* Update owntracks.py
pull/9401/merge
Paulus Schoutsen 2017-10-10 01:39:25 -07:00 committed by Fabian Affolter
parent e144b0f0f9
commit fc47e9443b
1 changed files with 3 additions and 2 deletions

View File

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