diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-04-30 23:46:42 +0100 |
---|---|---|
committer | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-05-06 13:30:03 +0100 |
commit | 1dd8feaee55c5f530528b59019a2ad3c357f2905 (patch) | |
tree | ad9ad67cecf1c305bc084c8e73052f77acfbf8e8 /lorrycontroller | |
parent | 78a5cd5a045dd94bdcf8ed5b09226f8bf2daca39 (diff) | |
download | lorry-controller-1dd8feaee55c5f530528b59019a2ad3c357f2905.tar.gz |
MINION: Convert binary data to text as necessary
* HTTP responses are bytes but json.load wants a str. Decode as UTF-8
in strict mode, on the assumption that WEBAPP will always produce
valid UTF-8.
* os.read returns bytes. Decode as UTF-8 in non-strict (replace)
mode.
Diffstat (limited to 'lorrycontroller')
0 files changed, 0 insertions, 0 deletions