Skip to content

Commit cda1a9f

Browse files
waldbauer-certatsebix
authored andcommitted
FIX: Moved SQLBot to SQLMixin namespace in generic-db-lookup
Fixes #2133 Signed-off-by: Sebastian Waldbauer <[email protected]>
1 parent 0221a25 commit cda1a9f

File tree

1 file changed

+2
-2
lines changed
  • intelmq/bots/experts/generic_db_lookup

1 file changed

+2
-2
lines changed

intelmq/bots/experts/generic_db_lookup/expert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ def process(self):
5858
if self.execute(self.query, [event[key] for key in self._match.keys()]):
5959
if self.cur.rowcount > 1:
6060
raise ValueError('Lookup returned more then one result. Please inspect.')
61-
elif self.cur.rowcount == 1 or (self.cur.rowcount == -1 and self.engine == SQLBot.SQLITE):
61+
elif self.cur.rowcount == 1 or (self.cur.rowcount == -1 and self.engine == SQLMixin.SQLITE):
6262
result = None
6363
if self.cur.rowcount == 1:
6464
result = self.cur.fetchone()
65-
elif self.cur.rowcount == -1 and self.engine == SQLBot.SQLITE:
65+
elif self.cur.rowcount == -1 and self.engine == SQLMixin.SQLITE:
6666
# https://docs.python.org/2/library/sqlite3.html#sqlite3.Cursor.rowcount
6767
# since the DB’s own support for the determination is quirky we try to fetch even when rowcount=-1
6868
result = self.cur.fetchone()

0 commit comments

Comments
 (0)