From 13144af65e8d1bab87c339cc9cdf50051c86f4eb Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 22 Nov 2018 15:06:31 +0100 Subject: [PATCH] Fix raising objects on proxy camera component --- homeassistant/components/camera/proxy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/camera/proxy.py b/homeassistant/components/camera/proxy.py index 48d324fcd3a..6e7ab9385bd 100644 --- a/homeassistant/components/camera/proxy.py +++ b/homeassistant/components/camera/proxy.py @@ -71,16 +71,16 @@ def _precheck_image(image, opts): import io if not opts: - raise ValueError + raise ValueError() try: img = Image.open(io.BytesIO(image)) except IOError: _LOGGER.warning("Failed to open image") - raise ValueError + raise ValueError() imgfmt = str(img.format) if imgfmt not in ('PNG', 'JPEG'): _LOGGER.warning("Image is of unsupported type: %s", imgfmt) - raise ValueError + raise ValueError() return img @@ -267,7 +267,7 @@ class ProxyCamera(Camera): if not image: return None except HomeAssistantError: - raise asyncio.CancelledError + raise asyncio.CancelledError() if self._mode == MODE_RESIZE: job = _resize_image