parameters: (ssl_ca_cert = None, ssl_context = None)
docstring: Return an SSLFactory, based on if M2Crypto is available.
docstring_summary: Return an SSLFactory, based on if M2Crypto is available.
docstring_tokens: Return an SSLFactory based on if M2Crypto is available .
function: def get_factory(ssl_ca_cert = None, ssl_context = None):
      """ Return an SSLFactory, based on if M2Crypto is available. """
      if have_m2crypto:
          return M2SSLFactory(ssl_ca_cert, ssl_context)
      else:
          # Log here if someone provides the args but we don't use them.
          if ssl_ca_cert or ssl_context:
              if DEBUG:
                  DEBUG.warning("SSL arguments supplied, but M2Crypto is not available. "
                          "Using Python SSL.")
          return SSLFactory()
function_tokens: def get_factory ( ssl_ca_cert = None , ssl_context = None ) : if have_m2crypto : return M2SSLFactory ( ssl_ca_cert , ssl_context ) else : # Log here if someone provides the args but we don't use them. if ssl_ca_cert or ssl_context : if DEBUG : DEBUG . warning ( "SSL arguments supplied, but M2Crypto is not available. " "Using Python SSL." ) return SSLFactory ( )