Skip to content

Commit df031ee

Browse files
author
Alexander Smishlajev
committed
pysqlite 1.1.6 does not allow to pass a list of tuples to cursor.execute().
according to PEP249, this kind of usage is deprecated: executemany() should be used instead.
1 parent 0d140a4 commit df031ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roundup/backends/indexer_rdbms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: indexer_rdbms.py,v 1.13 2006-04-27 06:33:18 richard Exp $
1+
#$Id: indexer_rdbms.py,v 1.14 2006-05-06 16:19:27 a1s Exp $
22
''' This implements the full-text indexer over two RDBMS tables. The first
33
is a mapping of words to occurance IDs. The second maps the IDs to (Class,
44
propname, itemid) instances.
@@ -69,7 +69,7 @@ def add_text(self, identifier, text, mime_type='text/plain'):
6969
# for each word, add an entry in the db
7070
sql = 'insert into __words (_word, _textid) values (%s, %s)'%(a, a)
7171
words = [(word, id) for word in words]
72-
self.db.cursor.execute(sql, words)
72+
self.db.cursor.executemany(sql, words)
7373

7474
def find(self, wordlist):
7575
'''look up all the words in the wordlist.

0 commit comments

Comments
 (0)