From a48cd109a37ce9d164cd20f96e9aef65d8355417 Mon Sep 17 00:00:00 2001 From: James Vega Date: Sat, 28 Nov 2009 17:48:03 -0500 Subject: [PATCH] Fix supybot-botchk's use of subprocess Signed-off-by: James Vega --- scripts/supybot-botchk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/supybot-botchk b/scripts/supybot-botchk index 9020f7273..ab5366c7a 100644 --- a/scripts/supybot-botchk +++ b/scripts/supybot-botchk @@ -127,12 +127,12 @@ if __name__ == '__main__': filename = os.path.join(home, filename) if os.path.exists(filename): debug('Found %s, sourcing.' % filename) - inst.communicate('source %s' % filename + os.linesep) - cmdline = "%s --daemon %s" % (options.supybot, options.conffile) + inst.stdin.write('source %s' % filename + os.linesep) + cmdline = '%s --daemon %s' % (options.supybot, options.conffile) debug('Sending cmdline to sh process.') - (stdout, _) = inst.communicate(cmdline + os.linesep) + inst.stdin.write(cmdline + os.linesep) inst.stdin.close() - debug('Received from sh process: %r' % stdout) + debug('Received from sh process: %r' % inst.stdout.read()) ret = inst.wait() debug('Bot started, command line %r returned %s.' % (cmdline, ret)) sys.exit(ret)