MOD: updated ver num, code cleanup

This commit is contained in:
JohnE 2016-02-26 20:21:42 -08:00
parent eaf415e7f0
commit a141b51529
2 changed files with 1 additions and 9 deletions

View File

@ -36,7 +36,7 @@ class FingerprintDB:
sqlmaster = "SELECT name, sql FROM sqlite_master WHERE type='table'"
# version of the scanner used to create the fingerprint
scanner_ver = "0.98"
scanner_ver = "1.00b"
# version of the json file format, this # is inserted in the json fingerprint file and can be used to determine what is supported at the time of that version
format_ver = "0.92"

View File

@ -224,7 +224,6 @@ class FingerprintIndex:
#
def __insertMod_md5_all(self, md5_db, md5_list, filename):
try:
#logging.info("INSERT INTO md5_all VALUES({}, {}, {}, 1)".format(md5_db, ','.join(md5_list), filename))
self.db_conn.execute(
'''
INSERT INTO md5_all VALUES(?, ?, ?, ?)
@ -234,7 +233,6 @@ class FingerprintIndex:
(fp_list, fp_count) = self.__selectFileList(md5_db)
fp_list += ","+filename
fp_count += 1
#logging.info("fp_list=={}".format(fp_list))
self.db_conn.execute(
'''
UPDATE md5_all SET fp_list=?, fp_count=? WHERE md5_db=?
@ -269,17 +267,11 @@ class FingerprintIndex:
#
def __insertMod_metadata(self, db, filename):
# insert the md5 of the table schemas
# print "*****"
# print "***** {}".format(db.metadata)
# print "***** {}".format(db.metadata['fart'])
# print "***** {}".format(db.metadata['app_name'])
try:
self.db_conn.execute(
'''
INSERT INTO metadata VALUES(?, ?, ?, ?, ?, ?)
''', [db.db_hash, db.metadata['app-name'], db.metadata['app-ver'], db.metadata['db-name'], filename, db.metadata['scan-date']])
# ''', ["abc", "efg", "hij", "klm", "nop", "qrs"])
except Exception as ex:
print ex
raise