From f924c96370ea655602ebb3891df974eea95b42ce Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Thu, 2 Aug 2012 17:25:45 -0400 Subject: [PATCH 1/2] remove the tab I found DIE TAB DIE pep8 --- lib/ansible/callbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index f32a56ebbb5..68f723cfd14 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -312,7 +312,7 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks): def on_skipped(self, host, item=None): - msg = '' + msg = '' if item: msg = "skipping: [%s] => (item=%s)" % (host, item) else: From 4d29cd6ee359f8ebbefc1392162fd02b48304a3a Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Thu, 2 Aug 2012 17:46:21 -0400 Subject: [PATCH 2/2] make virt module command= work again - better error handling should be in its future --- library/virt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/virt b/library/virt index 5de5567ebaa..45627b3d617 100755 --- a/library/virt +++ b/library/virt @@ -312,6 +312,7 @@ def core(module): v = Virt() res = {} + if state: if not guest: module.fail_json(msg = "state change requires a guest specified") @@ -337,13 +338,13 @@ def core(module): res = getattr(v, command)(guest) if type(res) != dict: res = { command: res } - return rc, res + return VIRT_SUCCESS, res elif hasattr(v, command): res = getattr(v, command)() if type(res) != dict: res = { command: res } - return rc, res + return VIRT_SUCCESS, res else: module.fail_json(msg="Command %s not recognized" % basecmd)