From 3fd04637af8dabcfd45ae44c6c22cd8cf6e81677 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 1 Sep 2003 08:40:41 +0000 Subject: [PATCH] Attempt to solve the atexit-closed-database problem. --- plugins/FunDB.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/FunDB.py b/plugins/FunDB.py index c276c1226..429ab54ea 100755 --- a/plugins/FunDB.py +++ b/plugins/FunDB.py @@ -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()