Fix bug with aioHTTP and none authentification (#4116)
This commit is contained in:
1 parent
54d19e3c53
commit
edeb31d74e
1 file changed
+5
-4
@@ -72,10 +72,11 @@ class MjpegCamera(Camera):
|
|||||||
self._mjpeg_url = device_info[CONF_MJPEG_URL]
|
self._mjpeg_url = device_info[CONF_MJPEG_URL]
|
||||||
|
|
||||||
self._auth = None
|
self._auth = None
|
||||||
if self._authentication == HTTP_BASIC_AUTHENTICATION:
|
if self._username and self._password:
|
||||||
self._auth = aiohttp.BasicAuth(
|
if self._authentication == HTTP_BASIC_AUTHENTICATION:
|
||||||
self._username, password=self._password
|
self._auth = aiohttp.BasicAuth(
|
||||||
)
|
self._username, password=self._password
|
||||||
|
)
|
||||||
|
|
||||||
def camera_image(self):
|
def camera_image(self):
|
||||||
"""Return a still image response from the camera."""
|
"""Return a still image response from the camera."""
|
||||||
|
|||||||
Reference in new issue
Block a user