diff --git a/mastochess.py b/mastochess.py index 1326dfc..6a23fc3 100644 --- a/mastochess.py +++ b/mastochess.py @@ -20,42 +20,6 @@ def unescape(s): s = s.replace("'", "'") return s -def last_notification(): - - ################################################################### - # query status_created_at of last notification - - try: - - conn = None - - conn = psycopg2.connect(database = chess_db, user = chess_db_user, password = "", host = "/var/run/postgresql", port = "5432") - - cur = conn.cursor() - - cur.execute("select status_created_at from botreplies order by status_created_at desc limit 1") - - row = cur.fetchone() - if row != None: - last_posted = row[0] - last_posted = last_posted.strftime("%d/%m/%Y, %H:%M:%S") - else: - last_posted = "" - - cur.close() - - return last_posted - - except (Exception, psycopg2.DatabaseError) as error: - - print(error) - - finally: - - if conn is not None: - - conn.close() - def get_bot_id(): ###################################################################################################################################