Commit 327c821f authored by louiz’'s avatar louiz’

Write irc output into a file

parent ee9b7f55
...@@ -433,14 +433,15 @@ if __name__ == '__main__': ...@@ -433,14 +433,15 @@ if __name__ == '__main__':
failures = 0 failures = 0
irc_output = open("irc_output.txt", "w")
irc = IrcServerRunner() irc = IrcServerRunner()
print("Starting irc server…") print("Starting irc server…")
asyncio.get_event_loop().run_until_complete(irc.start()) asyncio.get_event_loop().run_until_complete(irc.start())
while True: while True:
res = asyncio.get_event_loop().run_until_complete(irc.process.stderr.readline()) res = asyncio.get_event_loop().run_until_complete(irc.process.stderr.readline())
print(res) irc_output.write(res.decode())
if not res: if not res:
print("IRC server failed to start, exiting") print("IRC server failed to start, see irc_output.txt for more details. Exiting…")
sys.exit(1) sys.exit(1)
if b"now running in foreground mode" in res: if b"now running in foreground mode" in res:
break break
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment