mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Add more clear error on syncfile mistake
If a bad node was included in a syncfile, the error was highly misleading. Provide a more clear indicaiton of the problem on failure.
This commit is contained in:
parent
09ce824c85
commit
90af99e864
@ -98,11 +98,14 @@ class SyncList(object):
|
||||
v = v.strip()
|
||||
if ':' in v:
|
||||
nr, v = v.split(':', 1)
|
||||
for candidate in noderange.NodeRange(nr, cfg).nodes:
|
||||
if candidate == nodename:
|
||||
break
|
||||
else:
|
||||
continue
|
||||
try:
|
||||
for candidate in noderange.NodeRange(nr, cfg).nodes:
|
||||
if candidate == nodename:
|
||||
break
|
||||
else:
|
||||
continue
|
||||
except Exception as e:
|
||||
raise Exception('Error on syncfile line "{}": {}'.format(ent, str(e)))
|
||||
optparts = v.split()
|
||||
v = optparts[0]
|
||||
optparts = optparts[1:]
|
||||
|
Loading…
Reference in New Issue
Block a user