def getAllDbMatteID(self) : conn = sqlite3.connect(str(self.ui.db_lineEdit.text())) result = db.getAllMID(conn) ids = [] for each in result : ids.append(each[0]) conn.close() return ids
def checkMatteIDRecord(self, matteIds) : conn = sqlite3.connect(str(self.ui.db_lineEdit.text())) result = db.getAllMID(conn) rMatteIDs = [a[0] for a in result] allow = True ex = [] for eachId in matteIds : if eachId in rMatteIDs : allow = False result = db.getMatteID(conn, eachId) print 'Existing record ...' for each in result : print each conn.close() return allow