Fix meteoalarm exception handling with instance of KeyError (#34828)

This commit is contained in:
Franck Nijhof 2020-04-29 01:59:25 +02:00 committed by GitHub
parent 5825cd7868
commit b9bd757df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
try:
api = Meteoalert(country, province, language)
except KeyError():
except KeyError:
_LOGGER.error("Wrong country digits or province name")
return