diff --git a/web-to-db.py b/web-to-db.py index b5c5069..d2510c3 100644 --- a/web-to-db.py +++ b/web-to-db.py @@ -38,7 +38,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): try: conn = psycopg2.connect("dbname=hackzurich") cursor = conn.cursor() - cursor.execute("insert into data_test4 (packet) values ('%s')", data) + cursor.execute("insert into data_test4 (packet) values ('%s')", (data, )) conn.close() except Exception as e: print("DB Insert failed: %s" % e)