From 1f94944f87d2dd49c5735ef40ce8b62f891a4427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Sun, 27 Oct 2013 06:49:55 +0100 Subject: [PATCH] commit at exit, in case of interrupted execution --- src/bitrot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bitrot.py b/src/bitrot.py index 5e66e07..57041d8 100644 --- a/src/bitrot.py +++ b/src/bitrot.py @@ -86,6 +86,7 @@ def get_sqlite3_cursor(path, copy=False): 'mtime INTEGER, hash TEXT, timestamp TEXT)') if 'bitrot_hash_idx' not in names: cur.execute('CREATE INDEX bitrot_hash_idx ON bitrot (hash)') + atexit.register(conn.commit) return conn