1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-23 07:20:55 +03:00

ACMEServerMixin.__init__

This commit is contained in:
Jakub Warmuz
2015-10-07 19:00:47 +00:00
parent 1774ab64c4
commit f0c11152d2

View File

@@ -53,16 +53,13 @@ class HTTPSServer(TLSServer, BaseHTTPServer.HTTPServer):
class ACMEServerMixin: # pylint: disable=old-style-class,no-init
"""ACME server common settings mixin.
.. warning::
Subclasses have to init ``_stopped = False`` (it's not done here,
because of old-style classes madness).
"""
"""ACME server common settings mixin."""
server_version = "ACME standalone client"
allow_reuse_address = True
def __init__(self):
self._stopped = False
def serve_forever2(self):
"""Serve forever, until other thread calls `shutdown2`."""
while not self._stopped:
@@ -95,7 +92,7 @@ class ACMETLSServer(HTTPSServer, ACMEServerMixin):
"""
def __init__(self, *args, **kwargs):
self._stopped = False
ACMEServerMixin.__init__(self)
HTTPSServer.__init__(self, *args, **kwargs)
@@ -103,7 +100,7 @@ class ACMEServer(BaseHTTPServer.HTTPServer, ACMEServerMixin):
"""ACME Server (non-TLS)."""
def __init__(self, *args, **kwargs):
self._stopped = False
ACMEServerMixin.__init__(self)
BaseHTTPServer.HTTPServer.__init__(self, *args, **kwargs)