def check_depends(name):
 def check(n, filename):
  nodes = get_nodes_by_name(n, name)
  depends = [e.attributes for e in nodes if ('thirdparty' not in e.attributes.keys())]
  try:
   packages = [d['package'].value for d in depends]
  except KeyError:
   raise ManifestException("Invalid manifest file: depends is missing 'package' attribute")
  return [Depend(p) for p in packages]
 return check

def check_depends ( name ) : def check ( n , filename ) : nodes = get_nodes_by_name ( n , name ) depends = [ e . attributes for e in nodes if ( 'thirdparty' not in e . attributes . keys ( ) ) ] try : packages = [ d [ 'package' ] . value for d in depends ] except KeyError : raise ManifestException ( "Invalid manifest file: depends is missing 'package' attribute" ) return [ Depend ( p ) for p in packages ] return check
validator for manifest depends .