Fix: handle errors on init
ci/woodpecker/push/woodpecker Pipeline was successful Details

main
Dorian Zedler 2022-09-29 23:14:48 +02:00
parent 4be48f41d6
commit 7ba0eb5229
Signed by: dozedler
GPG Key ID: 989DE36109AFA354
1 changed files with 4 additions and 1 deletions

View File

@ -261,7 +261,10 @@ class MlmMatrixBot:
async def main():
bot = MlmMatrixBot()
await bot.init()
if not await bot.init():
logging.critical("Bot initialization failed")
sys.exit(1)
while True:
await bot.run()
time.sleep(60)