diff --git a/adafruit_hue.py b/adafruit_hue.py index 71b99da..2401f87 100644 --- a/adafruit_hue.py +++ b/adafruit_hue.py @@ -115,11 +115,11 @@ def discover_bridge(self): json_data = resp.json() bridge_ip = json_data[0]["internalipaddress"] resp.close() - except: + except Exception as err: raise TypeError( "Ensure the Philips Bridge and CircuitPython device\ are both on the same WiFi network." - ) + ) from err self._ip = bridge_ip # set up hue bridge address path self._bridge_url = "http://{}/api".format(self._ip)