mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Fix supybot-botchk's use of subprocess
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit a48cd109a3
)
This commit is contained in:
parent
a7c924b466
commit
2a79c0cab9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user