From 0a8d980f7335f709ab145d7872cac70581f1cfe3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 16 Sep 2016 18:27:44 +0200 Subject: [PATCH] Commit data :-) --- web-to-db.py | 1 + 1 file changed, 1 insertion(+) diff --git a/web-to-db.py b/web-to-db.py index 15ea693..4926099 100644 --- a/web-to-db.py +++ b/web-to-db.py @@ -39,6 +39,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): conn = psycopg2.connect("dbname=hackzurich") cursor = conn.cursor() cursor.execute("insert into data (packet) values (%s)", (data, )) + cursor.connection.commit() conn.close() except Exception as e: print("DB Insert failed: %s" % e)