commit at exit, in case of interrupted execution
This commit is contained in:
parent
9521bdea00
commit
1f94944f87
@ -86,6 +86,7 @@ def get_sqlite3_cursor(path, copy=False):
|
|||||||
'mtime INTEGER, hash TEXT, timestamp TEXT)')
|
'mtime INTEGER, hash TEXT, timestamp TEXT)')
|
||||||
if 'bitrot_hash_idx' not in names:
|
if 'bitrot_hash_idx' not in names:
|
||||||
cur.execute('CREATE INDEX bitrot_hash_idx ON bitrot (hash)')
|
cur.execute('CREATE INDEX bitrot_hash_idx ON bitrot (hash)')
|
||||||
|
atexit.register(conn.commit)
|
||||||
return conn
|
return conn
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user