From adcd9608a725d99e2e6ca74d4a31e6edb353af0c Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Fri, 5 Feb 2021 11:26:05 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/hashserv/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/hashserv/client.py b/bitbake/lib/hashserv/client.py index 0ffd0c2ae2..0b7f4e42e9 100644 --- a/bitbake/lib/hashserv/client.py +++ b/bitbake/lib/hashserv/client.py @@ -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") -- cgit v1.2.3-54-g00ecf