mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-24 12:11:52 +00:00
Fix common usage of noderange alerts
This fixes the usual circumstance of not having keyed input data.
This commit is contained in:
parent
63256e37b6
commit
0e04b853f6
@ -1379,6 +1379,8 @@ class InputAlertDestination(ConfluentMessage):
|
||||
self.alertcfg = {}
|
||||
if multinode: # keys are node names
|
||||
for node in inputdata:
|
||||
if not isinstance(inputdata[node], dict):
|
||||
break
|
||||
self.alertcfg[node] = inputdata[node]
|
||||
for key in inputdata[node]:
|
||||
if key not in self.valid_alert_params:
|
||||
@ -1391,7 +1393,8 @@ class InputAlertDestination(ConfluentMessage):
|
||||
else:
|
||||
self.alertcfg[node][key] = \
|
||||
self.valid_alert_params[key](inputdata[node][key])
|
||||
else:
|
||||
else:
|
||||
return
|
||||
for key in inputdata:
|
||||
if key not in self.valid_alert_params:
|
||||
raise exc.InvalidArgumentException(
|
||||
|
Loading…
Reference in New Issue
Block a user