Changeset 889
- Timestamp:
- 12/28/05 17:05:53
- Files:
-
- trunk/cherrypy/_cpserver.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpserver.py
r871 r889 2 2 3 3 import cgi 4 import sys 4 5 import threading 5 6 import time … … 111 112 cherrypy.log("SystemExit raised: shutting down server", "HTTP") 112 113 self.stop() 114 except: 115 # Don't bother logging, since we're going to re-raise. 116 self.interrupt = sys.exc_info()[1] 117 self.stop() 118 raise 113 119 114 120 def start_http_server(self, blocking=True): … … 233 239 234 240 def wait(self): 235 """Block the caller until ready to receive requests ."""241 """Block the caller until ready to receive requests (or error).""" 236 242 while not self.ready: 237 243 time.sleep(.1) 244 if self.interrupt: 245 # Something went wrong in server.start, 246 # possibly in another thread. Stop this thread. 247 raise cherrypy.NotReady("The CherryPy server errored", "HTTP") 238 248 239 249 def _is_ready(self): 240 250 return bool(self.state == STARTED) 241 ready = property(_is_ready, doc="Return True if the server is ready to receive requests, False otherwise.") 251 ready = property(_is_ready, doc="Return True if the server is ready to" 252 " receive requests, False otherwise.") 242 253 243 254 def start_with_callback(self, func, args=None, kwargs=None,

