MCPcopy
hub / github.com/cherrypy/cherrypy / httpserver_from_self

Method httpserver_from_self

cherrypy/_cpserver.py:175–185  ·  view source on GitHub ↗

Return a (httpserver, bind_addr) pair based on self attributes.

(self, httpserver=None)

Source from the content-addressed store, hash-verified

173 self.running = False
174
175 def httpserver_from_self(self, httpserver=None):
176 """Return a (httpserver, bind_addr) pair based on self attributes."""
177 if httpserver is None:
178 httpserver = self.instance
179 if httpserver is None:
180 from cherrypy import _cpwsgi_server
181 httpserver = _cpwsgi_server.CPWSGIServer(self)
182 if isinstance(httpserver, text_or_bytes):
183 # Is anyone using this? Can I add an arg?
184 httpserver = attributes(httpserver)(self)
185 return httpserver, self.bind_addr
186
187 def start(self):
188 """Start the HTTP server."""

Callers 1

startMethod · 0.95

Calls 1

attributesFunction · 0.90

Tested by

no test coverage detected