Commit 821aa432 by Brian Coca

corrected indentation and now handles non existing previous key (not

just changed existing)

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
parent 307ab1f5
...@@ -146,8 +146,12 @@ def main(): ...@@ -146,8 +146,12 @@ def main():
rc, msg, e = set_selection(module, pkg, question, type, value, unseen) rc, msg, e = set_selection(module, pkg, question, type, value, unseen)
if rc: if rc:
module.fail_json(msg=e) 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) module.exit_json(changed=changed, msg=msg, current=curr, previous=prev)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment