1. cherrypy
  2. CherryPy

Commits

Robert Brewer  committed 8ca306c

raise ValueError on cherrypy.server.start() if no httpservers defined.

  • Participants
  • Parent commits 4fffc66
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/_cpserver.py

View file
  • Ignore whitespace
     def start(self):
         """Start all registered HTTP servers."""
         self.interrupt = None
+        if not self.httpservers:
+            raise ValueError("No HTTP servers have been created. "
+                             "Try server.quickstart instead.")
         for httpserver in self.httpservers:
             self._start_http(httpserver)