Skip to content

Commit 4e30ad3

Browse files
committed
refactor(icinga-topflap-services): improve variable usage
1 parent f041586 commit 4e30ad3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

check-plugins/icinga-topflap-services/icinga-topflap-services

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,10 @@ def main():
281281
state = lib.base.get_worst(state, data[i]['state'])
282282

283283
# build the message
284-
state_messages = {
284+
msg = {
285285
STATE_CRIT: 'There are critical errors.',
286286
STATE_WARN: 'There are warnings.'
287-
}
288-
msg = state_messages.get(state, 'Everything is ok.')
287+
}.get(state, 'Everything is ok.')
289288
msg += f' (lookback={lib.human.seconds2human(args.LOOKBACK)} warn={args.WARN} crit={args.CRIT})'
290289
if data:
291290
msg += '\n\n' + lib.base.get_table(

0 commit comments

Comments
 (0)