Debug and exit if IRC server startup fails
This commit is contained in:
1 parent
71b3f8f50b
commit
3ddca86851
1 file changed
+4
@@ -438,6 +438,10 @@ if __name__ == '__main__':
|
||||
asyncio.get_event_loop().run_until_complete(irc.start())
|
||||
while True:
|
||||
res = asyncio.get_event_loop().run_until_complete(irc.process.stderr.readline())
|
||||
print(res)
|
||||
if not res:
|
||||
print("IRC server failed to start, exiting")
|
||||
sys.exit(1)
|
||||
if b"now running in foreground mode" in res:
|
||||
break
|
||||
print("irc server started.")
|
||||
|
||||
Reference in new issue
Block a user