Commit data :-)

This commit is contained in:
Nico Schottelius 2016-09-16 18:27:44 +02:00
parent 531e188fc2
commit 0a8d980f73
1 changed files with 1 additions and 0 deletions

View File

@ -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)