From 1a8e21d14a1f0a03025c3170c4233564a6d9384e Mon Sep 17 00:00:00 2001 From: Nabil Adouani Date: Wed, 14 Jun 2017 17:36:35 +0200 Subject: [PATCH] #57 Fix the failure handling and take into account analyzers whitout configuration --- contrib/cortexutils/analyzer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/cortexutils/analyzer.py b/contrib/cortexutils/analyzer.py index 8e092fda4..60208787e 100644 --- a/contrib/cortexutils/analyzer.py +++ b/contrib/cortexutils/analyzer.py @@ -151,13 +151,13 @@ def error(self, message, ensure_ascii=False): :param ensure_ascii: Force ascii output. Default: False""" analyzerInput = self.__input - if 'password' in analyzerInput.get('config'): + if 'password' in analyzerInput.get('config', {}): analyzerInput['config']['password'] = 'REMOVED' - if 'key' in analyzerInput.get('config'): + if 'key' in analyzerInput.get('config', {}): analyzerInput['config']['key'] = 'REMOVED' - if 'apikey' in analyzerInput.get('config'): + if 'apikey' in analyzerInput.get('config', {}): analyzerInput['config']['apikey'] = 'REMOVED' - if 'api_key' in analyzerInput.get('config'): + if 'api_key' in analyzerInput.get('config', {}): analyzerInput['config']['api_key'] = 'REMOVED' json.dump({'success': False,