def get_ssl_adapter_class(name='builtin'):
 adapter = ssl_adapters[name.lower()]
 if isinstance(adapter, basestring):
  last_dot = adapter.rfind('.')
  attr_name = adapter[(last_dot + 1):]
  mod_path = adapter[:last_dot]
  try:
   mod = sys.modules[mod_path]
   if (mod is None):
    raise KeyError()
  except KeyError:
   mod = __import__(mod_path, globals(), locals(), [''])
  try:
   adapter = getattr(mod, attr_name)
  except AttributeError:
   raise AttributeError(("'%s' object has no attribute '%s'" % (mod_path, attr_name)))
 return adapter

def get_ssl_adapter_class ( name = 'builtin' ) : adapter = ssl_adapters [ name . lower ( ) ] if isinstance ( adapter , basestring ) : last_dot = adapter . rfind ( '.' ) attr_name = adapter [ ( last_dot + 1 ) : ] mod_path = adapter [ : last_dot ] try : mod = sys . modules [ mod_path ] if ( mod is None ) : raise KeyError ( ) except KeyError : mod = __import__ ( mod_path , globals ( ) , locals ( ) , [ '' ] ) try : adapter = getattr ( mod , attr_name ) except AttributeError : raise AttributeError ( ( "'%s' object has no attribute '%s'" % ( mod_path , attr_name ) ) ) return adapter
return an ssl adapter class for the given name .