fix exception handling
This commit is contained in:
parent
93fbedadd5
commit
b46247c9ad
|
@ -191,10 +191,9 @@ if __name__ == "__main__":
|
||||||
trigger = trigger.Trigger(config)
|
trigger = trigger.Trigger(config)
|
||||||
|
|
||||||
bot = RetweetBot(trigger, config)
|
bot = RetweetBot(trigger, config)
|
||||||
|
try:
|
||||||
while True:
|
while True:
|
||||||
bot.flow()
|
bot.flow()
|
||||||
try:
|
sleep(1)
|
||||||
pass
|
|
||||||
except:
|
except:
|
||||||
bot.shutdown()
|
bot.shutdown()
|
||||||
sleep(1)
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ if __name__ == '__main__':
|
||||||
statuses = []
|
statuses = []
|
||||||
while True:
|
while True:
|
||||||
statuses = mbot.retoot(statuses)
|
statuses = mbot.retoot(statuses)
|
||||||
statuses = tbot.flow(statuses) # XXX not implemented in RetweetBot
|
statuses = tbot.flow(statuses)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
except:
|
except:
|
||||||
tbot.shutdown()
|
tbot.shutdown()
|
||||||
|
|
Loading…
Reference in a new issue