Commit data :-)
This commit is contained in:
parent
531e188fc2
commit
0a8d980f73
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue