def LoadSingleDispatch(dispatch_info, open_fn=None):
 builder = yaml_object.ObjectBuilder(DispatchInfoExternal)
 handler = yaml_builder.BuilderHandler(builder)
 listener = yaml_listener.EventListener(handler)
 listener.Parse(dispatch_info)
 parsed_yaml = handler.GetResults()
 if (not parsed_yaml):
  return DispatchInfoExternal()
 if (len(parsed_yaml) > 1):
  raise MalformedDispatchConfigurationError('Multiple dispatch: sections in configuration.')
 return parsed_yaml[0]

def LoadSingleDispatch ( dispatch_info , open_fn = None ) : builder = yaml_object . ObjectBuilder ( DispatchInfoExternal ) handler = yaml_builder . BuilderHandler ( builder ) listener = yaml_listener . EventListener ( handler ) listener . Parse ( dispatch_info ) parsed_yaml = handler . GetResults ( ) if ( not parsed_yaml ) : return DispatchInfoExternal ( ) if ( len ( parsed_yaml ) > 1 ) : raise MalformedDispatchConfigurationError ( 'Multiple dispatch: sections in configuration.' ) return parsed_yaml [ 0 ]
load a dispatch .