diff --git a/telegrambot.py b/telegrambot.py index 21ebb49..e16d336 100755 --- a/telegrambot.py +++ b/telegrambot.py @@ -89,9 +89,9 @@ def fish(bot, update): def getTweetID(tlid, cid): try: db = dbtools.dbHelper() - db.executeQuery("SELECT tid FROM timelines WHERE nr = %i AND cid = %i;" % (tlid, int(cid))) + db.executeQuery("SELECT tid FROM timelines WHERE nr = %i AND cid = %i;" % (int(tlid), int(cid))) return db.getNext()[0] - except: + except Exception: raise ValueError("No such tweet in timeline") def explicitTweet(bot, update, args, reply = None):