Changed the name of the uptimeEnder function so it shows up more clearly in atexit._exithandlers.

This commit is contained in:
Jeremy Fincher 2003-09-02 08:08:54 +00:00
parent 8f475fdcdd
commit 9b2a114d0c

View File

@ -113,13 +113,13 @@ def makeDb(dbfilename, replace=False):
return db
def uptimeEnder(started):
def f():
def endUptime():
db = makeDb(dbFilename)
cursor = db.cursor()
cursor.execute("""UPDATE uptime SET ended=%s WHERE started=%s""",
int(time.time()), started)
db.commit()
return f
return endUptime
def addWord(db, word, commit=False):
word = word.strip().lower()