From a5fc8d5d6bda53027dd053f937d80ea6296d3206 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 19 Mar 2015 19:10:28 +0100 Subject: [PATCH] Bad, really bad exception handling. --- getter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/getter.py b/getter.py index 24de8cc..0557e5d 100755 --- a/getter.py +++ b/getter.py @@ -59,9 +59,13 @@ while True: else: continue else: - api.update_status("@%s Das war doch schon...?" % sender, twid) + try: + api.update_status("@%s Das war doch schon...?" % sender, twid) + except Exception, e: + print e continue + cur.execute("INSERT INTO tweets VALUES(%i,'%s','%s','',0)" % (twid,date.strftime("%Y-%m-%dT%H:%M:%S"),sender)) sql_conn.commit()