Skip to content

Commit adbaa34

Browse files
authored
Using correct syntax
1 parent 5ed05c7 commit adbaa34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_lifx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def _parse_resp(response):
7979
try:
8080
for res in response.json()["results"]:
8181
return res["status"]
82-
except KeyError:
83-
raise KeyError(response.json()["error"]) from KeyError
82+
except KeyError as e:
83+
raise KeyError(response.json()["error"]) from e
8484

8585
# HTTP Requests
8686
def _post(self, path, data):

0 commit comments

Comments
 (0)