Toplevel collection typecheck.
Change-Id: I4a59d1b9391adb84f4a29520a179f8cdbc61e18d
This commit is contained in:
parent
a32288a573
commit
2fe4ed2e34
@ -120,6 +120,10 @@ class YamlParser(object):
|
||||
def parse(self, fn):
|
||||
data = yaml.load(open(fn))
|
||||
if data:
|
||||
if not isinstance(data, list):
|
||||
raise JenkinsJobsException(
|
||||
"The topmost collection in file '{fname}' must be a list,"
|
||||
" not a {cls}".format(fname=fn, cls=type(data)))
|
||||
for item in data:
|
||||
cls, dfn = item.items()[0]
|
||||
group = self.data.get(cls, {})
|
||||
|
Loading…
Reference in New Issue
Block a user