Source

trac-ticketlinks / trac / web / standalone.py

Diff from to

File trac/web/standalone.py

 
 import pkg_resources
 import os
+import select
 import sys
 from SocketServer import ThreadingMixIn
 
         WSGIServer.__init__(self, server_address, application,
                             request_handler=request_handlers[bool(use_http_11)])
 
+    if sys.version_info < (2, 6):
+        def serve_forever(self, poll_interval=0.5):
+            while True:
+                r, w, e = select.select([self], [], [], poll_interval)
+                if self in r:
+                    self.handle_request()
+
 
 class TracHTTPRequestHandler(WSGIRequestHandler):