flush looponfail output to get around line-buffering

--HG--
branch : trunk
This commit is contained in:
Ronny Pfannschmidt 2009-10-18 22:30:18 +02:00
parent c38bb72205
commit fabd967595
1 changed files with 4 additions and 1 deletions

View File

@ -79,7 +79,10 @@ class RemoteControl(object):
slave_runsession(channel, config, fullwidth, hasmarkup)
""")
remote_outchannel = channel.receive()
remote_outchannel.setcallback(out._file.write)
def write(s):
out._file.write(s)
out._file.flush()
remote_outchannel.setcallback(write)
channel = self.channel = PickleChannel(channel)
channel.send((self.config, out.fullwidth, out.hasmarkup))
self.trace("set up of slave session complete")