really fix SQL query

This commit is contained in:
Yann Leboulanger 2008-04-16 19:41:36 +00:00
parent 4bfd971415
commit 18c8500f9b
1 changed files with 7 additions and 4 deletions

View File

@ -748,8 +748,11 @@ class Logger:
gzip.write(data)
gzip.close()
data = string.getvalue()
sql = '''
self.cur.execute('''
INSERT INTO caps_cache ( node, ver, ext, data )
VALUES (%s, %s, %s, %s);
''' % (node, ver, ext, buffer(data)) # (1) -- note above
self.simple_commit(sql)
VALUES (?, ?, ?, ?);
''' % (node, ver, ext, buffer(data))) # (1) -- note above
try:
self.con.commit()
except sqlite.OperationalError, e:
print >> sys.stderr, str(e)