Markov: clean up the whole "need to create our own db object" thing
This commit is contained in:
parent
03d0d6bc2d
commit
5e8e93beba
|
@ -411,9 +411,8 @@ class Markov(Module):
|
|||
try:
|
||||
# need to create our own db object, since this is likely going to be in a new thread
|
||||
dbfile = self.config.get('dr.botzo', 'database')
|
||||
conn = sqlite3.connect(dbfile)
|
||||
conn.row_factory = sqlite3.Row
|
||||
db = conn
|
||||
db = sqlite3.connect(dbfile)
|
||||
db.row_factory = sqlite3.Row
|
||||
query = 'SELECT target FROM markov_chatter_target'
|
||||
cursor = db.execute(query)
|
||||
results = cursor.fetchall()
|
||||
|
|
Loading…
Reference in New Issue