aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-02-05 11:26:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-05 12:09:30 +0000
commitbf75370bcd6d02ed08cd959eec6190196b792515 (patch)
tree2ec036c79f3c4926bda5d2de14a0cf5f790db1d1 /lib
parent99bdb236bceeffa0083a0fa529280b217c1d310d (diff)
downloadbitbake-bf75370bcd6d02ed08cd959eec6190196b792515.tar.gz
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. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/hashserv/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hashserv/client.py b/lib/hashserv/client.py
index 0ffd0c2ae..0b7f4e42e 100644
--- a/lib/hashserv/client.py
+++ b/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")