# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
-ignored-modules=
+ignored-modules=cherrypy,distutils
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
from __future__ import absolute_import
import errno
+from distutils.version import StrictVersion
import os
import socket
import tempfile
import threading
from uuid import uuid4
+
from OpenSSL import crypto
+from mgr_module import MgrModule, MgrStandbyModule
+
try:
from urlparse import urljoin
except ImportError:
# The SSL code in CherryPy 3.5.0 is buggy. It was fixed long ago,
# but 3.5.0 is still shipping in major linux distributions
# (Fedora 27, Ubuntu Xenial), so we must monkey patch it to get SSL working.
-from distutils.version import StrictVersion
if cherrypy is not None:
v = StrictVersion(cherrypy.__version__)
# It was fixed in 3.7.0. Exact lower bound version is probably earlier,
if v >= StrictVersion("3.5.0") and v < StrictVersion("3.7.0"):
from cherrypy.wsgiserver.wsgiserver2 import HTTPConnection,\
CP_fileobject
+
def fixed_init(hc_self, server, sock, makefile=CP_fileobject):
hc_self.server = server
hc_self.socket = sock
HTTPConnection.__init__ = fixed_init
-from mgr_module import MgrModule, MgrStandbyModule
-
if 'COVERAGE_ENABLED' in os.environ:
import coverage
_cov = coverage.Coverage(config_file="{}/.coveragerc".format(os.path.dirname(__file__)))
self._stopping = threading.Event()
self._url_prefix = ""
+ self.cert_tmp = None
+ self.pkey_tmp = None
+
def shutdown(self):
self._stopping.set()
self.log.info("Configured CherryPy, starting engine...")
return uri
+
class Module(MgrModule, SSLCherryPyConfig):
"""
dashboard module entrypoint