FIX: fixed the database connection to be consistant
This commit is contained in:
parent
6a79f61cb6
commit
b6c6e0f600
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue