1313# FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
1414# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1515# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16- #
16+ #
1717
1818"""Command-line script that runs a server over roundup.cgi.client.
1919
20- $Id: roundup_server.py,v 1.48 2004-05-12 22:30:25 richard Exp $
20+ $Id: roundup_server.py,v 1.49 2004-05-14 20:02:44 a1s Exp $
2121"""
2222__docformat__ = 'restructuredtext'
2323
4545# This indicates where the Roundup trackers live. They're given as NAME ->
4646# TRACKER_HOME, where the NAME part is used in the URL to select the
4747# appropriate reacker.
48- # Make sure the NAME part doesn't include any url-unsafe characters like
48+ # Make sure the NAME part doesn't include any url-unsafe characters like
4949# spaces, as these confuse the cookie handling in browsers like IE.
5050TRACKER_HOMES = {
5151# 'example': '/path/to/example',
@@ -272,7 +272,7 @@ def __init__(self, args):
272272 # appending, unbuffered
273273 sys .stdout = sys .stderr = open (LOGFILE , 'a' , 0 )
274274 win32serviceutil .ServiceFramework .__init__ (self , args )
275- BaseHTTPServer .HTTPServer .__init__ (self , self .address ,
275+ BaseHTTPServer .HTTPServer .__init__ (self , self .address ,
276276 RoundupRequestHandler )
277277
278278 # Create the necessary NT Event synchronization objects...
@@ -321,7 +321,7 @@ def get_request(self):
321321 # caught by self.SvcDoRun
322322 raise SvcShutdown
323323 # Otherwise, rc == WAIT_OBJECT_0 + 1 which means
324- # self.hevConn was signaled, which means when we call
324+ # self.hevConn was signaled, which means when we call
325325 # self.socket.accept(), we'll have our incoming connection
326326 # socket!
327327 # Loop back to the top, and let that accept do its thing...
@@ -330,10 +330,10 @@ def get_request(self):
330330 # However... the new socket is non-blocking, we need to
331331 # set it back into blocking mode. (The socket that accept()
332332 # returns has the same properties as the listening sockets,
333- # this includes any properties set by WSAAsyncSelect, or
333+ # this includes any properties set by WSAAsyncSelect, or
334334 # WSAEventSelect, and whether its a blocking socket or not.)
335335 #
336- # So if you yank the following line, the setblocking() call
336+ # So if you yank the following line, the setblocking() call
337337 # will be useless. The socket will still be in non-blocking
338338 # mode.
339339 WSAEventSelect (rv [0 ], self .hevConn , 0 )
@@ -377,7 +377,7 @@ def usage(message=''):
377377 "roundup-admin init". You may specify any number of these name=home
378378 pairs on the command-line. For convenience, you may edit the
379379 TRACKER_HOMES variable in the roundup-server file instead.
380- Make sure the name part doesn't include any url-unsafe characters like
380+ Make sure the name part doesn't include any url-unsafe characters like
381381 spaces, as these confuse the cookie handling in browsers like IE.
382382''' )% locals ()
383383 sys .exit (0 )
@@ -464,7 +464,7 @@ def run(port=PORT, success_message=None):
464464
465465 if pidfile and not logfile :
466466 raise ValueError , _ ("logfile *must* be specified if pidfile is" )
467-
467+
468468 # obtain server before changing user id - allows to use port <
469469 # 1024 if started as root
470470 address = (hostname , port )
@@ -534,8 +534,8 @@ def run(port=PORT, success_message=None):
534534
535535 if pidfile :
536536 if not hasattr (os , 'fork' ):
537- print "Sorry, you can't run the server as a daemon on this" \
538- ' Operating System'
537+ print _ ( "Sorry, you can't run the server as a daemon"
538+ " on this Operating System" )
539539 sys .exit (0 )
540540 else :
541541 daemonize (pidfile )
0 commit comments