diff options
author | Paul Barker <pbarker@konsulko.com> | 2021-02-05 11:26:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-06 09:12:00 +0000 |
commit | adcd9608a725d99e2e6ca74d4a31e6edb353af0c (patch) | |
tree | 53746408e68ed6e99804e8ee219257a514026091 | |
parent | a8a468efac5c547caee173286c82e03d1867ae4b (diff) | |
download | poky-adcd9608a725d99e2e6ca74d4a31e6edb353af0c.tar.gz |
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>
-rw-r--r-- | bitbake/lib/hashserv/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): | |||
99 | l = await get_line() | 99 | l = await get_line() |
100 | 100 | ||
101 | m = json.loads(l) | 101 | m = json.loads(l) |
102 | if "chunk-stream" in m: | 102 | if m and "chunk-stream" in m: |
103 | lines = [] | 103 | lines = [] |
104 | while True: | 104 | while True: |
105 | l = (await get_line()).rstrip("\n") | 105 | l = (await get_line()).rstrip("\n") |