archive
/
ipc-unix
Archived
1
Fork 0

Refactor payload return to list comprehension

This commit is contained in:
Jake Howard 2018-12-08 14:23:34 +00:00
parent ead62d5671
commit 7fd83b05b9
Signed by: jake
GPG Key ID: 57AFB45680EDD477
1 changed files with 1 additions and 6 deletions

View File

@ -20,9 +20,4 @@ def read_payload(payload):
if message == b"":
break
data += message
parsed_data = []
for row in data.split(b"\n"):
if not row.strip():
continue
parsed_data.append(ujson.loads(row))
return parsed_data
return [ujson.loads(row) for row in data.split(b"\n") if row]