1
0
Fork 0

attempted bugfixes

This commit is contained in:
khr 2020-04-03 03:53:24 +00:00
parent 6e8a9b7207
commit ff23314d33
1 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ class ProcessWrapper:
def send(self, msg): def send(self, msg):
self.proc.stdin.write(msg) self.proc.stdin.write(msg)
self.proc.stdin.flush()
def wait(self): def wait(self):
return self.proc.wait() return self.proc.wait()
@ -55,9 +56,12 @@ def send_process_output(
def relay_queue_input( def relay_queue_input(
process: ProcessWrapper, msg_queue: message_queue.MessageQueue process: ProcessWrapper, msg_queue: message_queue.MessageQueue
): ):
log = LOG.getChild("relay_input")
for message in msg_queue: for message in msg_queue:
log.debug(message)
if "command" in message: if "command" in message:
process.send(message["command"]) log.debug("forwarding to process")
process.send(message["command"] + "\n")
else: else:
LOG.debug(message) LOG.debug(message)