def LoadSingleCron(cron_info, open_fn=None):
 builder = yaml_object.ObjectBuilder(CronInfoExternal)
 handler = yaml_builder.BuilderHandler(builder)
 listener = yaml_listener.EventListener(handler)
 listener.Parse(cron_info)
 cron_info = handler.GetResults()
 if (len(cron_info) < 1):
  raise MalformedCronfigurationFile('Empty cron configuration.')
 if (len(cron_info) > 1):
  raise MalformedCronfigurationFile('Multiple cron sections in configuration.')
 return cron_info[0]

def LoadSingleCron ( cron_info , open_fn = None ) : builder = yaml_object . ObjectBuilder ( CronInfoExternal ) handler = yaml_builder . BuilderHandler ( builder ) listener = yaml_listener . EventListener ( handler ) listener . Parse ( cron_info ) cron_info = handler . GetResults ( ) if ( len ( cron_info ) < 1 ) : raise MalformedCronfigurationFile ( 'Empty cron configuration.' ) if ( len ( cron_info ) > 1 ) : raise MalformedCronfigurationFile ( 'Multiple cron sections in configuration.' ) return cron_info [ 0 ]
load a cron .