From c42c8a800ec78b02a8ca22ee15ea17d1a3c4629b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 24 May 2017 07:39:18 +0200 Subject: [PATCH] Update travis, fix open ioc import --- .travis.yml | 7 +++---- misp_modules/modules/import_mod/openiocimport.py | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ec9b16f..c70bed3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,12 @@ python: - "3.4" - "3.5" - "3.5-dev" + - "3.6" + - "3.6-dev" - "nightly" install: - - pip install -U nose - - pip install coveralls - - pip install codecov + - pip install -U nose codecov pytest - pip install -U -r REQUIREMENTS - pip install . @@ -35,4 +35,3 @@ script: after_success: - coverage combine .coverage* - codecov - - coveralls diff --git a/misp_modules/modules/import_mod/openiocimport.py b/misp_modules/modules/import_mod/openiocimport.py index bf7a428..d5e39a0 100755 --- a/misp_modules/modules/import_mod/openiocimport.py +++ b/misp_modules/modules/import_mod/openiocimport.py @@ -68,9 +68,9 @@ def handler(q=False): "categories": [attrib.category], "comment":attrib.comment } - # add tag - if q['config'].get('default tag') is not None: - toAppend["tags"] = q['config']['default tag'].split(",") + # add tag + if q.get('config') and q['config'].get('default tag') is not None: + toAppend["tags"] = q['config']['default tag'].split(",") r["results"].append(toAppend) return r