generic camera: improved exception handling (#6158)

Avoid unhandled exception and stack trace when server closes connection by changing from handle ClientDisconnectedError to DisconnectedError. Also added HttpProcessingError, which was missing.
This commit is contained in:
Erik Eriksson authored and Paulus Schoutsen committed 2017-02-22 07:43:52 -08:00
1 parent 896e0476ff
commit 3b693d5e70
1 file changed
+2 -1
+2 -1
View File
@@ -118,7 +118,8 @@ class GenericCamera(Camera):
_LOGGER.error('Timeout getting camera image')
return self._last_image
except (aiohttp.errors.ClientError,
aiohttp.errors.ClientDisconnectedError) as err:
aiohttp.errors.DisconnectedError,
aiohttp.errors.HttpProcessingError) as err:
_LOGGER.error('Error getting new camera image: %s', err)
return self._last_image
finally: