mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 14:10:41 +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
|
return db
|
||||||
|
|
||||||
def uptimeEnder(started):
|
def uptimeEnder(started):
|
||||||
def f():
|
def endUptime():
|
||||||
db = makeDb(dbFilename)
|
db = makeDb(dbFilename)
|
||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
cursor.execute("""UPDATE uptime SET ended=%s WHERE started=%s""",
|
cursor.execute("""UPDATE uptime SET ended=%s WHERE started=%s""",
|
||||||
int(time.time()), started)
|
int(time.time()), started)
|
||||||
db.commit()
|
db.commit()
|
||||||
return f
|
return endUptime
|
||||||
|
|
||||||
def addWord(db, word, commit=False):
|
def addWord(db, word, commit=False):
|
||||||
word = word.strip().lower()
|
word = word.strip().lower()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user