Skip to content

Commit 729182a

Browse files
committed
json parser: check for parameter incompatibility
pointed out by @kamil-certat in https://github.com/certtools/intelmq/pull/2545/files#r2322188136
1 parent 17a246d commit 729182a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

intelmq/bots/parsers/json/parser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class JSONParserBot(ParserBot):
1717
splitlines: bool = False
1818
multiple_events: bool = False
1919

20+
def init(self):
21+
if self.multiple_events and self.splitlines:
22+
raise ValueError("Modes 'splitlines' and 'multiple_events' are not possible at the same time. Please use either one.")
23+
2024
def process(self):
2125
report = self.receive_message()
2226
if self.multiple_events:

0 commit comments

Comments
 (0)