Mercurial > hg > rlgallery-misc
comparison py/rlgall.py @ 41:d3ccdc195796
rlgall.py: delete a few lines that got moved elsewhere
author | John "Elwin" Edwards |
---|---|
date | Fri, 10 Jan 2014 17:01:11 -0500 |
parents | 09ef92dc4439 |
children | e1de8aeb5ed4 |
comparison
equal
deleted
inserted
replaced
40:1ddd2d950e31 | 41:d3ccdc195796 |
---|---|
368 conn.close() | 368 conn.close() |
369 return entries | 369 return entries |
370 def putIntoDB(self, dictlist, conn): | 370 def putIntoDB(self, dictlist, conn): |
371 "Add the entries in dictlist to the database through connection conn, \ | 371 "Add the entries in dictlist to the database through connection conn, \ |
372 which needs the INSERT privilege." | 372 which needs the INSERT privilege." |
373 fields = self.sqltypes.keys() | |
374 fstr = ", ".join(fields) | |
375 vstr = ", ".join([ "%({})s".format(c) for c in fields ]) | |
376 qstr = "INSERT INTO {0} ({1}) VALUES ({2});".format(self.uname, fstr, vstr); | |
377 cur = conn.cursor() | 373 cur = conn.cursor() |
378 cur.executemany(self.insertq, [ d for d in dictlist if d["game"] == self ]) | 374 cur.executemany(self.insertq, [ d for d in dictlist if d["game"] == self ]) |
379 conn.commit() | 375 conn.commit() |
380 cur.close() | 376 cur.close() |
381 return | 377 return |