From 6f5b4e4f6d2e70c43b2a704e58b216d16b8933b4 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 20 Mar 2017 14:42:09 +0100 Subject: [PATCH] Fix tweet ID finder --- telegrambot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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):