def BuildSingleObject(default_class, stream, loader=yaml.loader.SafeLoader):
 definitions = BuildObjects(default_class, stream, loader)
 if (len(definitions) < 1):
  raise yaml_errors.EmptyConfigurationFile()
 if (len(definitions) > 1):
  raise yaml_errors.MultipleConfigurationFile()
 return definitions[0]

def BuildSingleObject ( default_class , stream , loader = yaml . loader . SafeLoader ) : definitions = BuildObjects ( default_class , stream , loader ) if ( len ( definitions ) < 1 ) : raise yaml_errors . EmptyConfigurationFile ( ) if ( len ( definitions ) > 1 ) : raise yaml_errors . MultipleConfigurationFile ( ) return definitions [ 0 ]
build object from stream .