From 9a586c35127769ef52f65bde78ce4c6cd97fcb55 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 13 Jul 2015 16:20:19 -0400 Subject: [PATCH] Properly catch AnsibleError and not all errors --- lib/ansible/vars/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index a08e9c55bd2..599499ca2ad 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -209,7 +209,7 @@ class VariableManager: break else: raise AnsibleError("vars file %s was not found" % vars_file_item) - except: + except AnsibleError, e: # FIXME: get_vars should probably be taking a flag to determine # whether or not vars files errors should be fatal at this # stage, or just base it on whether a host was specified?