bitbake: hashserv: client: Fix handling of null responses

If the server returns an empty response ("null" in json), this cannot
be iterated to check for the presence of the "chunk-stream" key.

(Bitbake rev: bf75370bcd6d02ed08cd959eec6190196b792515)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Barker
2021-02-05 11:26:05 +00:00
committed by Richard Purdie
parent a8a468efac
commit adcd9608a7

View File

@@ -99,7 +99,7 @@ class AsyncClient(object):
l = await get_line()
m = json.loads(l)
if "chunk-stream" in m:
if m and "chunk-stream" in m:
lines = []
while True:
l = (await get_line()).rstrip("\n")