Don't bother pushing if we've no attributes

travis
Hannah Ward 2016-11-18 14:42:53 +00:00
parent 0647e27385
commit 0464921b0e
No known key found for this signature in database
GPG Key ID: 6F3BAD60DE190290
1 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ def post_stix(manager, content_block, collection_ids, service_id):
# Push the event to MISP # Push the event to MISP
# TODO: There's probably a proper method to do this rather than json_full # TODO: There's probably a proper method to do this rather than json_full
# But I don't wanna read docs # But I don't wanna read docs
if (len(package.attributes) > 0):
MISP.add_event(package._json_full()) MISP.add_event(package._json_full())
# Make TAXII call our push function whenever it gets new data # Make TAXII call our push function whenever it gets new data