Exemplo n.º 1
0
 def __init__(self,
              debuglevel=0,
              context=None,
              source_address=None,
              timeout=10):
     AbstractHTTPHandler.__init__(self, debuglevel)
     self._context = context
     self.source_address = source_address
     self.timeout = timeout
Exemplo n.º 2
0
    def __init__(self, ssl_context, debuglevel=0):
        """
        @param ssl_context:SSL context
        @type ssl_context: OpenSSL.SSL.Context
        @param debuglevel: debug level for HTTPSHandler
        @type debuglevel: int
        """
        AbstractHTTPHandler.__init__(self, debuglevel)

        if ssl_context is not None:
            if not isinstance(ssl_context, SSL.Context):
                raise TypeError('Expecting OpenSSL.SSL.Context type for "'
                                'ssl_context" keyword; got %r instead' %
                                ssl_context)
            self.ssl_context = ssl_context
        else:
            self.ssl_context = SSL.Context(SSL.SSLv23_METHOD)
Exemplo n.º 3
0
 def __init__(self, default_path):
     AbstractHTTPHandler.__init__(self)
     self.default_path = default_path
 def __init__(self, **kwargs):
     AbstractHTTPHandler.__init__(self)
     self._connection_args = kwargs
Exemplo n.º 5
0
 def __init__(self, **kwargs):
     """Constructor. Any keyword args are passed to the httplib handler."""
     AbstractHTTPHandler.__init__(self)
     self._connection_args = kwargs
Exemplo n.º 6
0
 def __init__(self, **kwargs):
     """Constructor. Any keyword args are passed to the httplib handler."""
     AbstractHTTPHandler.__init__(self)
     self._connection_args = kwargs