Let psycogy do the espace

This commit is contained in:
Nico Schottelius 2016-09-16 18:04:16 +02:00
parent ff3501e572
commit d2f0789de3

View file

@ -38,7 +38,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
try: try:
conn = psycopg2.connect("dbname=hackzurich") conn = psycopg2.connect("dbname=hackzurich")
cursor = conn.cursor() 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() conn.close()
except Exception as e: except Exception as e:
print("DB Insert failed: %s" % e) print("DB Insert failed: %s" % e)