From 5ccfe328eacaf75402bae619eafc1bf0ae8a6f9f Mon Sep 17 00:00:00 2001 From: b3yond Date: Tue, 11 Jul 2017 22:05:46 +0200 Subject: [PATCH] make error messages great (again) --- retweetbot.py | 5 +++-- ticketfrei.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/retweetbot.py b/retweetbot.py index 5ceb4df..f75fe60 100644 --- a/retweetbot.py +++ b/retweetbot.py @@ -5,6 +5,7 @@ import requests import pytoml as toml import trigger from time import sleep +import traceback class RetweetBot(object): @@ -195,6 +196,6 @@ if __name__ == "__main__": while True: bot.flow() sleep(6) - except Exception as e: - print(e) + except: + traceback.print_exc() bot.shutdown() diff --git a/ticketfrei.py b/ticketfrei.py index f260778..53ec218 100644 --- a/ticketfrei.py +++ b/ticketfrei.py @@ -1,5 +1,6 @@ import pytoml as toml import time +import traceback from retootbot import RetootBot from retweetbot import RetweetBot @@ -22,6 +23,6 @@ if __name__ == '__main__': statuses = mbot.retoot(statuses) statuses = tbot.flow(statuses) time.sleep(1) - except Exception as e: - print e + except: + traceback.print_exc() tbot.shutdown()