mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Attempt to solve the atexit-closed-database problem.
This commit is contained in:
parent
8b1a47b295
commit
3fd04637af
@ -146,9 +146,10 @@ class FunDB(callbacks.Privmsg):
|
||||
callbacks.Privmsg.__init__(self)
|
||||
self.db = makeDb(dbFilename)
|
||||
cursor = self.db.cursor()
|
||||
started = int(world.startedAt)
|
||||
cursor.execute("""INSERT INTO uptime VALUES (%s, NULL)""", started)
|
||||
self.db.commit()
|
||||
atexit.register(uptimeEnder(int(world.startedAt)))
|
||||
atexit.register(uptimeEnder(started))
|
||||
|
||||
def die(self):
|
||||
self.db.commit()
|
||||
|
Loading…
Reference in New Issue
Block a user