Skip to content

Commit

Permalink
[handlers] Add single handler use-case
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-afedorov committed Aug 25, 2020
1 parent c4fdeb5 commit 972c5cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/runners/alert_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ def main():
results = []

handlers = alert.get('HANDLERS')
for handler in ['jira'] if handlers is None else handlers:
if handlers is None:
handlers = 'jira'
if isinstance(handlers, (str, dict)):
handlers = [handlers]

for handler in handlers:
if handler is None:
results.append(None)

Expand Down

0 comments on commit 972c5cd

Please sign in to comment.