From b46247c9ad0e859acebba7d5dd73df920e00d9d5 Mon Sep 17 00:00:00 2001 From: Thomas L Date: Sun, 25 Jun 2017 21:42:06 +0200 Subject: [PATCH] fix exception handling --- retweetbot.py | 13 ++++++------- ticketfrei.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/retweetbot.py b/retweetbot.py index 94e608d..a0b17f8 100644 --- a/retweetbot.py +++ b/retweetbot.py @@ -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() diff --git a/ticketfrei.py b/ticketfrei.py index 452eec4..bc8a49a 100644 --- a/ticketfrei.py +++ b/ticketfrei.py @@ -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()