fix exception handling
This commit is contained in:
parent
93fbedadd5
commit
b46247c9ad
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue