diff --git a/intelmq/bots/experts/generic_db_lookup/expert.py b/intelmq/bots/experts/generic_db_lookup/expert.py index 6a625ceb1..5f254bdb0 100644 --- a/intelmq/bots/experts/generic_db_lookup/expert.py +++ b/intelmq/bots/experts/generic_db_lookup/expert.py @@ -58,11 +58,11 @@ def process(self): if self.execute(self.query, [event[key] for key in self._match.keys()]): if self.cur.rowcount > 1: raise ValueError('Lookup returned more then one result. Please inspect.') - elif self.cur.rowcount == 1 or (self.cur.rowcount == -1 and self.engine == SQLBot.SQLITE): + elif self.cur.rowcount == 1 or (self.cur.rowcount == -1 and self.engine == SQLMixin.SQLITE): result = None if self.cur.rowcount == 1: result = self.cur.fetchone() - elif self.cur.rowcount == -1 and self.engine == SQLBot.SQLITE: + elif self.cur.rowcount == -1 and self.engine == SQLMixin.SQLITE: # https://docs.python.org/2/library/sqlite3.html#sqlite3.Cursor.rowcount # since the DB’s own support for the determination is quirky we try to fetch even when rowcount=-1 result = self.cur.fetchone()