FIX: fixed the database connection to be consistant
This commit is contained in:
parent
6a79f61cb6
commit
b6c6e0f600
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
[[ TODO ]]
|
[[ TODO ]]
|
||||||
|
|
||||||
-MD5 Index
|
[ MD5 Index ]
|
||||||
-add column, fp_count NUMBER (number of fingerprints for this md5 schema)
|
-modify fingerprint compare feature to use the index
|
||||||
-complete populating the second index
|
|
||||||
|
|
||||||
-add "-idxf" "--index_force" to force a re-index
|
-add "-idxf" "--index_force" to force a re-index
|
||||||
-first give info about current index
|
-first give info about current index
|
||||||
|
|
|
@ -36,12 +36,12 @@ class FingerprintIndex:
|
||||||
else:
|
else:
|
||||||
logging.info("No index file found, creating index now...")
|
logging.info("No index file found, creating index now...")
|
||||||
self.createIndex(fp_dir)
|
self.createIndex(fp_dir)
|
||||||
|
self.db_conn = sql.connect(fq_fpidx)
|
||||||
except:
|
except:
|
||||||
raise FingerprintIndexOpen("Error opening/creating an index file")
|
|
||||||
finally:
|
|
||||||
if self.db_conn:
|
if self.db_conn:
|
||||||
self.db_conn.close()
|
self.db_conn.close()
|
||||||
self.db_conn = None
|
self.db_conn = None
|
||||||
|
raise FingerprintIndexOpen("Error opening/creating an index file")
|
||||||
|
|
||||||
#
|
#
|
||||||
def createIndex(self, fp_dir):
|
def createIndex(self, fp_dir):
|
||||||
|
|
Loading…
Reference in New Issue