Use str literals (#33654)

This commit is contained in:
Franck Nijhof 2020-04-04 22:08:49 +02:00 committed by GitHub
parent 886308a953
commit 03cae17992
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -88,7 +88,7 @@ class RachioWebhookView(HomeAssistantView):
data = await request.json()
try:
auth = data.get(KEY_EXTERNAL_ID, str()).split(":")[1]
auth = data.get(KEY_EXTERNAL_ID, "").split(":")[1]
assert auth == hass.data[DOMAIN][self._entry_id].rachio.webhook_auth
except (AssertionError, IndexError):
return web.Response(status=web.HTTPForbidden.status_code)