fix: skipping empty lines

pull/156/head
chrisr3d 2018-01-29 09:19:58 +01:00
parent 56cbd72b65
commit 529d22cca8
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 3 additions and 1 deletions

View File

@ -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)