Validate top level of the layout configuration, too
I got an exception that a list object has no method "get" when I accidentally put the contents of my pipelines as the top level object in the layout YAML file. Change-Id: Ia88f2a849bbc1dca5ec44afc969ddfa9c3598f1e
This commit is contained in:
@@ -192,6 +192,9 @@ class LayoutSchema(object):
|
||||
return parameters
|
||||
|
||||
def getSchema(self, data):
|
||||
if not isinstance(data, dict):
|
||||
raise Exception("Malformed layout configuration: top-level type "
|
||||
"should be a dictionary")
|
||||
pipelines = data.get('pipelines')
|
||||
if not pipelines:
|
||||
pipelines = []
|
||||
|
||||
Reference in New Issue
Block a user