Skip to content

Commit

Permalink
#57 Fix the failure handling and take into account analyzers whitout …
Browse files Browse the repository at this point in the history
…configuration
  • Loading branch information
nadouani committed Jun 15, 2017
1 parent 1d71635 commit 7e06c3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contrib/cortexutils/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7e06c3e

Please sign in to comment.