mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fix supybot-botchk's use of subprocess
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
89a535e8c1
commit
a48cd109a3
@ -127,12 +127,12 @@ if __name__ == '__main__':
|
|||||||
filename = os.path.join(home, filename)
|
filename = os.path.join(home, filename)
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
debug('Found %s, sourcing.' % filename)
|
debug('Found %s, sourcing.' % filename)
|
||||||
inst.communicate('source %s' % filename + os.linesep)
|
inst.stdin.write('source %s' % filename + os.linesep)
|
||||||
cmdline = "%s --daemon %s" % (options.supybot, options.conffile)
|
cmdline = '%s --daemon %s' % (options.supybot, options.conffile)
|
||||||
debug('Sending cmdline to sh process.')
|
debug('Sending cmdline to sh process.')
|
||||||
(stdout, _) = inst.communicate(cmdline + os.linesep)
|
inst.stdin.write(cmdline + os.linesep)
|
||||||
inst.stdin.close()
|
inst.stdin.close()
|
||||||
debug('Received from sh process: %r' % stdout)
|
debug('Received from sh process: %r' % inst.stdout.read())
|
||||||
ret = inst.wait()
|
ret = inst.wait()
|
||||||
debug('Bot started, command line %r returned %s.' % (cmdline, ret))
|
debug('Bot started, command line %r returned %s.' % (cmdline, ret))
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user