corrected indentation and now handles non existing previous key (not
just changed existing) Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
parent
3587053119
commit
ce72f27787
1 changed files with 6 additions and 2 deletions
|
@ -146,8 +146,12 @@ def main():
|
|||
rc, msg, e = set_selection(module, pkg, question, type, value, unseen)
|
||||
if rc:
|
||||
module.fail_json(msg=e)
|
||||
curr = { question: value }
|
||||
prev = {question: prev[question]}
|
||||
|
||||
curr = { question: value }
|
||||
if question in prev:
|
||||
prev = {question: prev[question]}
|
||||
else:
|
||||
prev[question] = ''
|
||||
|
||||
module.exit_json(changed=changed, msg=msg, current=curr, previous=prev)
|
||||
|
||||
|
|
Loading…
Reference in a new issue