mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Don't use None inside header (#11725)
This commit is contained in:
parent
020593d509
commit
4ee2c311a7
@ -330,7 +330,7 @@ class HassIO(object):
|
||||
request = yield from self.websession.request(
|
||||
method, "http://{}{}".format(self._ip, command),
|
||||
json=payload, headers={
|
||||
X_HASSIO: os.environ.get('HASSIO_TOKEN')
|
||||
X_HASSIO: os.environ.get('HASSIO_TOKEN', "")
|
||||
})
|
||||
|
||||
if request.status not in (200, 400):
|
||||
@ -359,7 +359,7 @@ class HassIO(object):
|
||||
|
||||
try:
|
||||
data = None
|
||||
headers = {X_HASSIO: os.environ.get('HASSIO_TOKEN')}
|
||||
headers = {X_HASSIO: os.environ.get('HASSIO_TOKEN', "")}
|
||||
with async_timeout.timeout(10, loop=self.loop):
|
||||
data = yield from request.read()
|
||||
if data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user