Skip to content

Commit 2ef47c9

Browse files
authored
Update gist.py
Chain exception
1 parent fd58b55 commit 2ef47c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_pastebin/gist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ def paste(
7070
json_response = json.loads(response.text)
7171
try:
7272
return json_response["html_url"]
73-
except KeyError:
73+
except KeyError as err:
7474
error_message = json_response["message"]
75-
raise RuntimeError(error_message)
75+
raise RuntimeError(error_message) from err

0 commit comments

Comments
 (0)