From b6c6e0f600cf6ec8bef8a7021b8a005a128edfad Mon Sep 17 00:00:00 2001 From: JohnE Date: Mon, 28 Dec 2015 22:51:37 -0800 Subject: [PATCH] FIX: fixed the database connection to be consistant --- docs/devnotes | 5 ++--- libs/fingerprint_index.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/devnotes b/docs/devnotes index 5ab623e..e834574 100644 --- a/docs/devnotes +++ b/docs/devnotes @@ -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 diff --git a/libs/fingerprint_index.py b/libs/fingerprint_index.py index d0c4bd6..6dc741b 100644 --- a/libs/fingerprint_index.py +++ b/libs/fingerprint_index.py @@ -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):