Fix "tell me more" returning a tuple
authorArmaan Bhojwani <me@armaanb.net>
Tue, 26 Jan 2021 05:03:44 +0000 (00:03 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Tue, 26 Jan 2021 05:04:23 +0000 (00:04 -0500)
tallbot.py

index f17e04e5348def307940d2bf257618a16daf7ad5..4e25e327df0a07a5ca3cce3eaf92fbe14ee57b76 100755 (executable)
@@ -48,7 +48,9 @@ def tell_more(inp, pid):
         old = int(time.time()) - 150
         c.execute("SELECT query FROM queries WHERE pid = (?) AND time > (?)",
                   (str(pid), old))
-        return c.fetchone()
+
+        (query, *_) = c.fetchone()
+        return str(query)
 
     if find_query(inp):
         return query_lookup(pid)