diff roundup/scripts/roundup_server.py @ 1736:c376d6c2da1a

logfile must be specified if pidfile is [SF#772820]
author Richard Jones <richard@users.sourceforge.net>
date Tue, 12 Aug 2003 01:14:11 +0000
parents 141d5a0869fa
children d51cb5225d4a a1e38322bd19
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py	Tue Aug 12 01:11:43 2003 +0000
+++ b/roundup/scripts/roundup_server.py	Tue Aug 12 01:14:11 2003 +0000
@@ -16,7 +16,7 @@
 # 
 """ HTTP Server that serves roundup.
 
-$Id: roundup_server.py,v 1.25 2003-08-12 01:11:43 richard Exp $
+$Id: roundup_server.py,v 1.26 2003-08-12 01:14:11 richard Exp $
 """
 
 # python version check
@@ -316,7 +316,7 @@
  -l: sets a filename to log to (instead of stdout)
  -d: run the server in the background and on UN*X write the server's PID
      to the nominated file. Note: on Windows the PID argument is needed,
-     but ignored.
+     but ignored. The -l option *must* be specified if this option is.
  -N: log client machine names in access log instead of IP addresses (much
      slower)
 
@@ -405,6 +405,9 @@
             elif opt == '-h': usage()
             elif opt == '-N': RoundupRequestHandler.LOG_IPADDRESS = 0
 
+        if pidfile and not logfile:
+            raise ValueError, _("logfile *must* be specified if pidfile is")
+
         if hasattr(os, 'getuid'):
             # if root, setuid to the running user
             if not os.getuid() and user is not None:

Roundup Issue Tracker: http://roundup-tracker.org/