events: fix calling mgmt.Events from VM
asyncio.create_subprocess_exec expects program and arguments directly, not as a list.
This commit is contained in:
parent
c545c95660
commit
ce7d4865b6
@ -87,7 +87,7 @@ class EventsDispatcher(object):
|
||||
writer.close()
|
||||
elif self.app.qubesd_connection_type == 'qrexec':
|
||||
proc = yield from asyncio.create_subprocess_exec(
|
||||
['qrexec-client-vm', dest, 'admin.Events'],
|
||||
'qrexec-client-vm', dest, 'admin.Events',
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
|
||||
proc.stdin.write_eof()
|
||||
|
@ -199,8 +199,8 @@ class TC_00_Events(qubesadmin.tests.QubesTestCase):
|
||||
task = asyncio.ensure_future(self.dispatcher._get_events_reader())
|
||||
loop.run_until_complete(task)
|
||||
self.assertEqual(mock_proc.mock_calls, [
|
||||
unittest.mock.call(['qrexec-client-vm', 'dom0',
|
||||
'admin.Events'], stdin=subprocess.PIPE,
|
||||
unittest.mock.call('qrexec-client-vm', 'dom0',
|
||||
'admin.Events', stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE),
|
||||
unittest.mock.call().stdin.write_eof()
|
||||
])
|
||||
@ -224,8 +224,8 @@ class TC_00_Events(qubesadmin.tests.QubesTestCase):
|
||||
task = asyncio.ensure_future(self.dispatcher._get_events_reader(vm))
|
||||
loop.run_until_complete(task)
|
||||
self.assertEqual(mock_proc.mock_calls, [
|
||||
unittest.mock.call(['qrexec-client-vm', 'test-vm',
|
||||
'admin.Events'], stdin=subprocess.PIPE,
|
||||
unittest.mock.call('qrexec-client-vm', 'test-vm',
|
||||
'admin.Events', stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE),
|
||||
unittest.mock.call().stdin.write_eof()
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user