1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

now bad ini entries will throw friendlier error

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
Brian Coca 2013-08-07 12:49:12 -04:00
parent 0089ecfa7e
commit a937a6a66d

View file

@ -112,7 +112,10 @@ class InventoryParser(object):
for t in tokens[1:]:
if t.startswith('#'):
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)
self.groups[active_group_name].add_host(host)