def get_runnertype_by_name(runnertype_name):
 try:
  runnertypes = RunnerType.query(name=runnertype_name)
 except (ValueError, ValidationError) as e:
  LOG.error('Database lookup for name="%s" resulted in exception: %s', runnertype_name, e)
  raise StackStormDBObjectNotFoundError(('Unable to find runnertype with name="%s"' % runnertype_name))
 if (not runnertypes):
  raise StackStormDBObjectNotFoundError(('Unable to find RunnerType with name="%s"' % runnertype_name))
 if (len(runnertypes) > 1):
  LOG.warning('More than one RunnerType returned from DB lookup by name. Result list is: %s', runnertypes)
 return runnertypes[0]

def get_runnertype_by_name ( runnertype_name ) : try : runnertypes = RunnerType . query ( name = runnertype_name ) except ( ValueError , ValidationError ) as e : LOG . error ( 'Database lookup for name="%s" resulted in exception: %s' , runnertype_name , e ) raise StackStormDBObjectNotFoundError ( ( 'Unable to find runnertype with name="%s"' % runnertype_name ) ) if ( not runnertypes ) : raise StackStormDBObjectNotFoundError ( ( 'Unable to find RunnerType with name="%s"' % runnertype_name ) ) if ( len ( runnertypes ) > 1 ) : LOG . warning ( 'More than one RunnerType returned from DB lookup by name. Result list is: %s' , runnertypes ) return runnertypes [ 0 ]
get an runnertype by name .