From 9c713858072f99784927b7610adcab2881f3b391 Mon Sep 17 00:00:00 2001 From: anthonybaxter Date: Thu, 19 Jul 2001 10:43:01 +0000 Subject: [PATCH] HTTP_HOST and HTTP_PORT config options. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@15 57a73879-2fb5-44c3-a270-3262357dd7e2 --- config.py | 18 ++++++++++++++++-- server.py | 17 ++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index 9261da8..01d807d 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,7 @@ -# $Id: config.py,v 1.5 2001-07-19 06:27:07 anthonybaxter Exp $ +# $Id: config.py,v 1.6 2001-07-19 10:43:01 anthonybaxter Exp $ -ROUNDUP_HOME=MAIL_DOMAIN=MAILHOST=None +ROUNDUP_HOME=MAIL_DOMAIN=MAILHOST=HTTP_HOST=None +HTTP_PORT=0 try: from localconfig import * @@ -21,6 +22,12 @@ if not MAILHOST: if not MAIL_DOMAIN: MAIL_DOMAIN = 'bizarsoftware.com.au' +# the next two are only used for the standalone HTTP server. +if not HTTP_HOST: + HTTP_HOST = '' +if not HTTP_PORT: + HTTP_PORT = 9080 + # This is the directory that the database is going to be stored in DATABASE = os.path.join(ROUNDUP_HOME, 'db') @@ -37,6 +44,13 @@ del os # # $Log: not supported by cvs2svn $ +# Revision 1.5 2001/07/19 06:27:07 anthonybaxter +# fixing (manually) the (dollarsign)Log(dollarsign) entries caused by +# my using the magic (dollarsign)Id(dollarsign) and (dollarsign)Log(dollarsign) +# strings in a commit message. I'm a twonk. +# +# Also broke the help string in two. +# # Revision 1.4 2001/07/19 05:52:22 anthonybaxter # Added CVS keywords Id and Log to all python files. # diff --git a/server.py b/server.py index fdb4825..7aece05 100755 --- a/server.py +++ b/server.py @@ -3,7 +3,7 @@ Stolen from CGIHTTPServer -$Id: server.py,v 1.3 2001-07-19 06:27:07 anthonybaxter Exp $ +$Id: server.py,v 1.4 2001-07-19 10:43:01 anthonybaxter Exp $ """ import sys @@ -144,14 +144,25 @@ def nobody_uid(): nobody = 1 + max(map(lambda x: x[2], pwd.getpwall())) return nobody -if __name__ == '__main__': - address = ('dirk.adroit', 9080) +def main(): + from config import HTTP_HOST, HTTP_PORT + address = (HTTP_HOST, HTTP_PORT) httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler) print 'Roundup server started on', address httpd.serve_forever() +if __name__ == '__main__': + main() + # # $Log: not supported by cvs2svn $ +# Revision 1.3 2001/07/19 06:27:07 anthonybaxter +# fixing (manually) the (dollarsign)Log(dollarsign) entries caused by +# my using the magic (dollarsign)Id(dollarsign) and (dollarsign)Log(dollarsign) +# strings in a commit message. I'm a twonk. +# +# Also broke the help string in two. +# # Revision 1.2 2001/07/19 05:52:22 anthonybaxter # Added CVS keywords Id and Log to all python files. # -- 2.30.2