Module.py: make get_db() threadsafe by having it create a new connection every time
This commit is contained in:
parent
152ef2a1ad
commit
c08e7cabc0
@ -184,7 +184,10 @@ class Module(object):
|
||||
See also db_module_registered, below.
|
||||
"""
|
||||
|
||||
return self.conn
|
||||
dbfile = self.config.get('dr.botzo', 'database')
|
||||
conn = sqlite3.connect(dbfile)
|
||||
conn.row_factory = sqlite3.Row
|
||||
return conn
|
||||
|
||||
def db_module_registered(self, modulename):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user