summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/tests.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-06-07 16:37:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 08:35:06 +0100
commiteba5321786c4e673164e26995aca503a4f875910 (patch)
treeab9ff984e0af0496557e0478523298b31e5020a6 /bitbake/lib/toaster/toastergui/tests.py
parent16df75d49dad735c5887eeeceacfa800f4d18fe3 (diff)
downloadpoky-eba5321786c4e673164e26995aca503a4f875910.tar.gz
bitbake: toaster: open image files in binary mode when sending in response
The view code for downloading image files used the "r" flag to read the file, then used the open file object to form the HTTP response. While this worked in Python 2, Python 3 appears to be more strict about this sort of thing, and Django throws a UnicodeDecodeError when a file opened this way is used in a response. Open the file with the "b" flag (binary mode) so that Django can correctly convert the binary file handle to an HTTP response. (Bitbake rev: c4d67968d0ec1d5ff53cdc0dccf6a7869c89597b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tests.py')
0 files changed, 0 insertions, 0 deletions