FIX: fixed the database connection to be consistant

This commit is contained in:
JohnE 2015-12-28 22:51:37 -08:00
parent 6a79f61cb6
commit b6c6e0f600
2 changed files with 4 additions and 5 deletions

View File

@ -1,9 +1,8 @@
[[ TODO ]]
-MD5 Index
-add column, fp_count NUMBER (number of fingerprints for this md5 schema)
-complete populating the second index
[ MD5 Index ]
-modify fingerprint compare feature to use the index
-add "-idxf" "--index_force" to force a re-index
-first give info about current index

View File

@ -36,12 +36,12 @@ class FingerprintIndex:
else:
logging.info("No index file found, creating index now...")
self.createIndex(fp_dir)
self.db_conn = sql.connect(fq_fpidx)
except:
raise FingerprintIndexOpen("Error opening/creating an index file")
finally:
if self.db_conn:
self.db_conn.close()
self.db_conn = None
raise FingerprintIndexOpen("Error opening/creating an index file")
#
def createIndex(self, fp_dir):