Skip to content
Snippets Groups Projects
Commit e9f2998d authored by jurgenhaas's avatar jurgenhaas
Browse files

Bugfix with device alerts

parent 20128c69
Branches
No related tags found
No related merge requests found
......@@ -131,6 +131,7 @@ class ActionModule(object):
for alertname in alerts:
vv('- - - ' + alertname)
alert = alerts.get(alertname)
alert.__setitem__('host', host)
self.ensure_alert(alert, 'device')
vv('Ensure device group alerts...')
......@@ -206,8 +207,11 @@ class ActionModule(object):
if request_result.status_code != 200:
msg = content['message']
if content['errors']:
for error in content['errors']:
msg += ' // ' + error['description']
for error in content['errors']:
if error['message']:
msg += ' // ' + error['message']
if error['description']:
msg += ' // ' + error['description']
raise ae('%s' % msg)
return content
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment