From aa555b8b16e74f011db4e0e14a59680c3cd23a7f Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Tue, 17 Apr 2012 15:29:59 +0200 Subject: [PATCH] Inventory: AnsibleError is not global... --- lib/ansible/inventory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/inventory.py b/lib/ansible/inventory.py index e98cd3309fa..3295f3f2dd8 100644 --- a/lib/ansible/inventory.py +++ b/lib/ansible/inventory.py @@ -218,7 +218,7 @@ class Inventory(object): def set_variables(host, variables): for variable in variables: if len(variable) != 1: - raise AnsibleError("Only one item expected in %s"%(variable)) + raise errors.AnsibleError("Only one item expected in %s"%(variable)) k, v = variable.items()[0] self._set_variable(host, k, v) @@ -235,7 +235,7 @@ class Inventory(object): return host_name else: - raise AnsibleError("Unknown item in inventory: %s"%(item)) + raise errors.AnsibleError("Unknown item in inventory: %s"%(item)) def _get_variables_from_script(self, host):