Markov: don't clobber existing database objects in the forked thread
This commit is contained in:
parent
a73aec8ff0
commit
7692d295f6
|
@ -382,9 +382,9 @@ 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')
|
||||
self.conn = sqlite3.connect(dbfile)
|
||||
self.conn.row_factory = sqlite3.Row
|
||||
db = self.conn
|
||||
conn = sqlite3.connect(dbfile)
|
||||
conn.row_factory = sqlite3.Row
|
||||
db = conn
|
||||
query = 'SELECT target FROM markov_chatter_target'
|
||||
cursor = db.execute(query)
|
||||
results = cursor.fetchall()
|
||||
|
|
Loading…
Reference in New Issue