Try to insert packet into database

This commit is contained in:
Nico Schottelius 2016-09-16 18:01:45 +02:00
parent f543598d9f
commit ff3501e572

View file

@ -37,6 +37,9 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
def insert_xml(self, data):
try:
conn = psycopg2.connect("dbname=hackzurich")
cursor = conn.cursor()
cursor.execute("insert into data_test4 (packet) values ('%s')" % data)
conn.close()
except Exception as e:
print("DB Insert failed: %s" % e)