Commit 508b69f
Fix(webhooks.py): Fixes JSON parsing errors in Python 3
This commit fixes some errors caused by changes to Flask and the JSON
parsing libraries in Python 3.
The change to .get_json() fixes an error because the Flask request.data
is encoded as a bytestring in python3, and loads() only supports string
as a datatype. `loads(request.data.decode('utf-8'))` would be the
equivalent.
Decoded the `stdout` and `stderr` to fix parsing errors with `dumps()`1 parent 74497a0 commit 508b69f
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
0 commit comments