now bad ini entries will throw friendlier error
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>pull/4420/head
parent
0089ecfa7e
commit
a937a6a66d
|
@ -112,7 +112,10 @@ class InventoryParser(object):
|
||||||
for t in tokens[1:]:
|
for t in tokens[1:]:
|
||||||
if t.startswith('#'):
|
if t.startswith('#'):
|
||||||
break
|
break
|
||||||
(k,v) = t.split("=")
|
try:
|
||||||
|
(k,v) = t.split("=")
|
||||||
|
except ValueError, e:
|
||||||
|
raise errors.AnsibleError("Invalid ini entry: %s - %s" % (t, str(e)))
|
||||||
host.set_variable(k,v)
|
host.set_variable(k,v)
|
||||||
self.groups[active_group_name].add_host(host)
|
self.groups[active_group_name].add_host(host)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue