From 529d22cca80820690183a10016f03f38d5047a6c Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Mon, 29 Jan 2018 09:19:58 +0100 Subject: [PATCH] fix: skipping empty lines --- misp_modules/modules/import_mod/csvimport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misp_modules/modules/import_mod/csvimport.py b/misp_modules/modules/import_mod/csvimport.py index 4076902..50e9837 100644 --- a/misp_modules/modules/import_mod/csvimport.py +++ b/misp_modules/modules/import_mod/csvimport.py @@ -59,7 +59,9 @@ def buildAttributes(header, dataValues, delimiter, length): if delimiter is None: mispType = header[0] for data in dataValues: - attributes.append({'type': mispType, 'value': data.strip()}) + d = data.strip() + if d: + attributes.append({'type': mispType, 'value': d}) else: # split fields that should be recognized as misp attribute types from the others list2pop, misp, head = findMispTypes(header)