Commit 87d672c
authored
Fix python 3 support
Under Python 3, the `response` argument passed to the `event_handler()` function is a `bytes` instance; before using the data from it in string manipulations and print statements, it needs to be transformed to `str`, because the automatic "cast" includes an initial `b` and quotes around the value.
Under Python 2, this is still ok if the logs are all ASCII, but more generally, who cares. Python 2 is dead.
This proposal is courtesy of Matific -- see https://www.matific.com1 parent 87632a7 commit 87d672c
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments