From 8713607df39d3e9b0432c4bfadc6c327fdb87d14 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 28 Jul 2012 14:23:53 -0400 Subject: [PATCH] Implement get_signatures_from_db(). --- earwigbot/tasks/drn_clerkbot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/earwigbot/tasks/drn_clerkbot.py b/earwigbot/tasks/drn_clerkbot.py index 7f3e2c2..a268742 100644 --- a/earwigbot/tasks/drn_clerkbot.py +++ b/earwigbot/tasks/drn_clerkbot.py @@ -327,7 +327,10 @@ class DRNClerkBot(Task): return [(username, timestamp_datetime)...] def get_signatures_from_db(self, conn, case): - raise NotImplementedError() # TODO + query = "SELECT signature_username, signature_timestamp FROM signature WHERE signature_case = ?" + with conn.cursor() as cursor: + cursor.execute(query, (case.id,)) + return cursor.fetchall() def build_talk_notice(self, status): param = self.ALIASES[status][0]