fixes exception raised due to KeyError (#5068)

The vyos_config module would error when looking for a key called `updates`
in module.params.  There is no such key.  This fixes the problem.
This commit is contained in:
Peter Sprygada 2016-09-27 22:17:32 -04:00 committed by Matt Clay
parent 73cf85d677
commit 0a85e64b4a

View file

@ -244,12 +244,11 @@ def run(module, result):
result['updates'] = updates result['updates'] = updates
if module.params['update'] != 'check': load_config(module, updates, result)
load_config(module, updates, result)
if result.get('filtered'): if result.get('filtered'):
result['warnings'].append('Some configuration commands where ' result['warnings'].append('Some configuration commands where '
'removed, please see the filtered key') 'removed, please see the filtered key')
def main(): def main():