You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the generic csv parser encounters a - as value in a column, the data is rejected by:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 978, in process
events = list(filter(bool, value))
File "/usr/lib/python3/dist-packages/intelmq/bots/parsers/generic/parser_csv.py", line 130, in parse_line
raise InvalidValue(key, value)
intelmq.lib.exceptions.InvalidValue: invalid value '-' (<class 'str'>) for key 'extra.cert_orgunit'
If Message.add gets a value to be ignored (like -), the return value is None, which evaluates to False. I think changing the if-clause to ... is not False is enough.
Please add a testcase for this.
The text was updated successfully, but these errors were encountered:
Currently CsvParser handles "-" values incorrectly, throwing
an error, which was not intended.
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
Fixes#1651
If the generic csv parser encounters a
-
as value in a column, the data is rejected by:Example data is as simple as:
The reason is in these lines of code:
intelmq/intelmq/bots/parsers/generic/parser_csv.py
Lines 129 to 130 in 4d10b2b
If
Message.add
gets a value to be ignored (like-
), the return value isNone
, which evaluates to False. I think changing the if-clause to... is not False
is enough.Please add a testcase for this.
The text was updated successfully, but these errors were encountered: