fix exception handling

This commit is contained in:
Thomas L 2017-06-25 21:42:06 +02:00
parent 93fbedadd5
commit b46247c9ad
2 changed files with 7 additions and 8 deletions

View File

@ -191,10 +191,9 @@ if __name__ == "__main__":
trigger = trigger.Trigger(config)
bot = RetweetBot(trigger, config)
while True:
bot.flow()
try:
pass
except:
bot.shutdown()
sleep(1)
try:
while True:
bot.flow()
sleep(1)
except:
bot.shutdown()

View File

@ -20,7 +20,7 @@ if __name__ == '__main__':
statuses = []
while True:
statuses = mbot.retoot(statuses)
statuses = tbot.flow(statuses) # XXX not implemented in RetweetBot
statuses = tbot.flow(statuses)
time.sleep(1)
except:
tbot.shutdown()