tools/qubesd-query: handle events-based methods
Pass the data as it arrives, instead of buffering it all. QubesOS/qubes-issues#2622
This commit is contained in:
parent
40a86efd66
commit
7e4bc4249d
@ -54,8 +54,10 @@ def qubesd_client(socket, payload, *args):
|
||||
writer.write_eof()
|
||||
|
||||
try:
|
||||
data = yield from reader.read()
|
||||
sys.stdout.buffer.write(data) # pylint: disable=no-member
|
||||
while not reader.at_eof():
|
||||
data = yield from reader.read(4096)
|
||||
sys.stdout.buffer.write(data) # pylint: disable=no-member
|
||||
sys.stdout.flush()
|
||||
except asyncio.CancelledError:
|
||||
return
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user