201 query.addBindValue(QByteArray(hashValue), |
201 query.addBindValue(QByteArray(hashValue), |
202 QSql.In | QSql.Binary) |
202 QSql.In | QSql.Binary) |
203 |
203 |
204 query.exec_() |
204 query.exec_() |
205 |
205 |
206 while query.next(): # __IGNORE_WARNING_M513__ |
206 while query.next(): # __IGNORE_WARNING_M523__ |
207 threatType = query.value(0) |
207 threatType = query.value(0) |
208 platformType = query.value(1) |
208 platformType = query.value(1) |
209 threatEntryType = query.value(2) |
209 threatEntryType = query.value(2) |
210 hasExpired = bool(query.value(3)) |
210 hasExpired = bool(query.value(3)) |
211 threatList = ThreatList(threatType, platformType, |
211 threatList = ThreatList(threatType, platformType, |
246 for prefix in prefixes: |
246 for prefix in prefixes: |
247 query.addBindValue(prefix) |
247 query.addBindValue(prefix) |
248 |
248 |
249 query.exec_() |
249 query.exec_() |
250 |
250 |
251 while query.next(): # __IGNORE_WARNING_M513__ |
251 while query.next(): # __IGNORE_WARNING_M523__ |
252 fullHash = bytes(query.value(0)) |
252 fullHash = bytes(query.value(0)) |
253 threatType = query.value(1) |
253 threatType = query.value(1) |
254 platformType = query.value(2) |
254 platformType = query.value(2) |
255 threatEntryType = query.value(3) |
255 threatEntryType = query.value(3) |
256 negativeCacheExpired = bool(query.value(4)) |
256 negativeCacheExpired = bool(query.value(4)) |
426 query = QSqlQuery(db) |
426 query = QSqlQuery(db) |
427 query.prepare(queryStr) |
427 query.prepare(queryStr) |
428 |
428 |
429 query.exec_() |
429 query.exec_() |
430 |
430 |
431 while query.next(): # __IGNORE_WARNING_M513__ |
431 while query.next(): # __IGNORE_WARNING_M523__ |
432 threatType = query.value(0) |
432 threatType = query.value(0) |
433 platformType = query.value(1) |
433 platformType = query.value(1) |
434 threatEntryType = query.value(2) |
434 threatEntryType = query.value(2) |
435 clientState = query.value(3) |
435 clientState = query.value(3) |
436 threatList = ThreatList(threatType, platformType, |
436 threatList = ThreatList(threatType, platformType, |
554 query.addBindValue(threatList.platformType) |
554 query.addBindValue(threatList.platformType) |
555 query.addBindValue(threatList.threatEntryType) |
555 query.addBindValue(threatList.threatEntryType) |
556 |
556 |
557 query.exec_() |
557 query.exec_() |
558 |
558 |
559 while query.next(): # __IGNORE_WARNING_M513__ |
559 while query.next(): # __IGNORE_WARNING_M523__ |
560 sha256Hash.addData(query.value(0)) |
560 sha256Hash.addData(query.value(0)) |
561 QCoreApplication.processEvents(QEventLoop.AllEvents, |
561 QCoreApplication.processEvents(QEventLoop.AllEvents, |
562 self.maxProcessEventsTime) |
562 self.maxProcessEventsTime) |
563 del query |
563 del query |
564 finally: |
564 finally: |
635 query.addBindValue(threatList.threatEntryType) |
635 query.addBindValue(threatList.threatEntryType) |
636 |
636 |
637 query.exec_() |
637 query.exec_() |
638 |
638 |
639 index = 0 |
639 index = 0 |
640 while query.next(): # __IGNORE_WARNING_M513__ |
640 while query.next(): # __IGNORE_WARNING_M523__ |
641 if index in indexes: |
641 if index in indexes: |
642 prefix = bytes(query.value(0)) |
642 prefix = bytes(query.value(0)) |
643 output.append(prefix) |
643 output.append(prefix) |
644 index += 1 |
644 index += 1 |
645 QCoreApplication.processEvents(QEventLoop.AllEvents, |
645 QCoreApplication.processEvents(QEventLoop.AllEvents, |