Check text key exists on eos_banner absent case (#23319)

This can fail if we don't check the key exists.
(cherry picked from commit b9b4e68206)
pull/23330/head
Ricardo Carrillo Cruz 9 years ago
parent 5e09ddb6a4
commit bfb50df9a7

@ -95,7 +95,7 @@ def map_obj_to_commands(updates, module):
want, have = updates
state = module.params['state']
if state == 'absent' and have['text']:
if state == 'absent' and 'text' in have.keys() and have['text']:
commands.append('no banner %s' % module.params['banner'])
elif state == 'present':

Loading…
Cancel
Save