def LoadAppInclude(app_include):
 builder = yaml_object.ObjectBuilder(AppInclude)
 handler = yaml_builder.BuilderHandler(builder)
 listener = yaml_listener.EventListener(handler)
 listener.Parse(app_include)
 includes = handler.GetResults()
 if (len(includes) < 1):
  raise appinfo_errors.EmptyConfigurationFile()
 if (len(includes) > 1):
  raise appinfo_errors.MultipleConfigurationFile()
 includeyaml = includes[0]
 if includeyaml.handlers:
  for handler in includeyaml.handlers:
   handler.FixSecureDefaults()
   handler.WarnReservedURLs()
 if includeyaml.builtins:
  BuiltinHandler.Validate(includeyaml.builtins)
 return includeyaml

def LoadAppInclude ( app_include ) : builder = yaml_object . ObjectBuilder ( AppInclude ) handler = yaml_builder . BuilderHandler ( builder ) listener = yaml_listener . EventListener ( handler ) listener . Parse ( app_include ) includes = handler . GetResults ( ) if ( len ( includes ) < 1 ) : raise appinfo_errors . EmptyConfigurationFile ( ) if ( len ( includes ) > 1 ) : raise appinfo_errors . MultipleConfigurationFile ( ) includeyaml = includes [ 0 ] if includeyaml . handlers : for handler in includeyaml . handlers : handler . FixSecureDefaults ( ) handler . WarnReservedURLs ( ) if includeyaml . builtins : BuiltinHandler . Validate ( includeyaml . builtins ) return includeyaml
load a single appinclude object where one and only one is expected .