specs: add convenience function for reading spec dependencies from node dict
This commit is contained in:
parent
4daa164fbf
commit
acdb391931
@ -1558,6 +1558,15 @@ def from_node_dict(node):
|
||||
|
||||
return spec
|
||||
|
||||
@staticmethod
|
||||
def dependencies_from_node_dict(node):
|
||||
name = next(iter(node))
|
||||
node = node[name]
|
||||
if 'dependencies' not in node:
|
||||
return
|
||||
for t in Spec.read_yaml_dep_specs(node['dependencies']):
|
||||
yield t
|
||||
|
||||
@staticmethod
|
||||
def read_yaml_dep_specs(dependency_dict):
|
||||
"""Read the DependencySpec portion of a YAML-formatted Spec.
|
||||
|
Loading…
Reference in New Issue
Block a user