only send event if tqm exists

fixes #13843
This commit is contained in:
Brian Coca 2016-01-13 10:17:43 -05:00
parent 9833051e1e
commit a196c7d737
2 changed files with 4 additions and 1 deletions

View file

@ -167,6 +167,9 @@ install:
sdist: clean docs
$(PYTHON) setup.py sdist
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
rpmcommon: $(MANPAGES) sdist
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/

View file

@ -112,8 +112,8 @@ class PlaybookExecutor:
salt = var.get("salt", None)
if vname not in self._variable_manager.extra_vars:
self._tqm.send_callback('v2_playbook_on_vars_prompt', vname, private, prompt, encrypt, confirm, salt_size, salt, default)
if self._tqm:
self._tqm.send_callback('v2_playbook_on_vars_prompt', vname, private, prompt, encrypt, confirm, salt_size, salt, default)
play.vars[vname] = display.do_var_prompt(vname, private, prompt, encrypt, confirm, salt_size, salt, default)
else: # we are either in --list-<option> or syntax check
play.vars[vname] = default