From a851efd7f825b7b7168ece8f07dbd5d6b99568b6 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 12 Nov 2016 04:36:25 +0100 Subject: [PATCH] modified: submitbot_tcp.py --- submitbot_tcp.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/submitbot_tcp.py b/submitbot_tcp.py index fe0a1dd..6803845 100644 --- a/submitbot_tcp.py +++ b/submitbot_tcp.py @@ -75,19 +75,7 @@ def main(): print "*** sleeping "+str(sleeptime)+" sec..." time.sleep(sleeptime) dbconn = psycopg2.connect("host=127.0.0.1 port=5432 dbname=flagbot user=flagbot password=flagbotpw") - cur = dbconn.cursor() - cur.execute("CREATE TABLE IF NOT EXISTS flags (" - "fid serial NOT NULL PRIMARY KEY," - "flag character varying(32) NOT NULL UNIQUE," - "service character varying(32)," - "received timestamp without time zone NOT NULL DEFAULT date_trunc('second', NOW())," - "submitted timestamp without time zone," - "status integer NOT NULL DEFAULT 0," - "srvresponse character varying(128)" - ")") - dbconn.commit() - cur.close() - print "Connected to DB + table created" + print "Connected to DB" cur = None while True: -- 2.43.0