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:
Marek Marczykowski-Górecki 2017-04-10 01:47:04 +02:00
parent 40a86efd66
commit 7e4bc4249d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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: