From 1bebb17e9ff5dc9b67a173b80bc76237a8273841 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 25 Nov 2015 18:14:19 +0100 Subject: [PATCH] Not need to raise exception --- homeassistant/components/switch/mystrom.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/homeassistant/components/switch/mystrom.py b/homeassistant/components/switch/mystrom.py index 48f47b41ed6..3acbfb24ce6 100644 --- a/homeassistant/components/switch/mystrom.py +++ b/homeassistant/components/switch/mystrom.py @@ -72,9 +72,6 @@ class MyStromSwitch(SwitchDevice): timeout=10) if request.status_code == 200: self._state = True - else: - raise requests.exceptions.ConnectionError - except requests.exceptions.ConnectionError: _LOGGER.error("Can't turn on %s. Is device offline?", self._resource) @@ -87,9 +84,6 @@ class MyStromSwitch(SwitchDevice): timeout=10) if request.status_code == 200: self._state = False - else: - raise requests.exceptions.ConnectionError - except requests.exceptions.ConnectionError: _LOGGER.error("Can't turn on %s. Is device offline?", self._resource)