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)