mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Changed the name of the uptimeEnder function so it shows up more clearly in atexit._exithandlers.
This commit is contained in:
parent
8f475fdcdd
commit
9b2a114d0c
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user