Twitter: Markov used our "need to create our own db object" logic and then improved it.
most importantly, don't clobber the first thread's db instances
This commit is contained in:
parent
5e8e93beba
commit
c55852129a
@ -299,9 +299,8 @@ class Twitter(Module):
|
||||
# need to create our own db object, since this is likely going
|
||||
# to be called 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
|
||||
db = sqlite3.connect(dbfile)
|
||||
db.row_factory = sqlite3.Row
|
||||
query = 'SELECT since_id FROM twitter_settings'
|
||||
cursor = db.execute(query)
|
||||
result = cursor.fetchone()
|
||||
|
Loading…
Reference in New Issue
Block a user