X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=cgi-bin%2Froundup.cgi;h=ad2a7b9980a43d23c3f2107b934bfe93756b0860;hb=98ed2786eab246058ceddb8e0c386b201a8c55c4;hp=511e08b7fb46f6d4b02ec0f3a77f7409e0da7817;hpb=59b698465c9f6f040d320c7d69ec211577bec214;p=roundup.git diff --git a/cgi-bin/roundup.cgi b/cgi-bin/roundup.cgi index 511e08b..ad2a7b9 100755 --- a/cgi-bin/roundup.cgi +++ b/cgi-bin/roundup.cgi @@ -1,20 +1,21 @@ #!/usr/bin/env python -# $Id: roundup.cgi,v 1.2 2001-07-23 04:31:40 richard Exp $ +# $Id: roundup.cgi,v 1.4 2001-07-23 04:47:27 anthonybaxter Exp $ # python version check import sys if int(sys.version[0]) < 2: print "Content-Type: text/plain\n" print "Roundup requires Python 2.0 or newer." + sys.exit(0) # ## Configuration # # This indicates where the Roundup instance lives -ROUNDUPS = { - 'roundup_test': '/tmp/', +ROUNDUP_INSTANCE_HOMES = { + 'test': '/tmp/roundup_test', } # Where to log debugging information to. Use an instance of DevNull if you @@ -90,9 +91,10 @@ try: path = string.split(os.environ['PATH_INFO'], '/') instance = path[1] os.environ['PATH_INFO'] = string.join(path[2:], '/') - if ROUNDUPS.has_key(instance): - instance_home = ROUNDUPS[instance] - sys.path.insert(0, instance_home) + if ROUNDUP_INSTANCE_HOMES.has_key(instance): + instance_home = ROUNDUP_INSTANCE_HOMES[instance] + module_path, instance = os.path.split(instance_home) + sys.path.insert(0, module_path) try: instance = __import__(instance) finally: @@ -109,6 +111,12 @@ sys.stdout, sys.stderr = out, err # # $Log: not supported by cvs2svn $ +# Revision 1.3 2001/07/23 04:33:30 richard +# brought the CGI instance config dict in line with roundup-server +# +# Revision 1.2 2001/07/23 04:31:40 richard +# Fixed the roundup CGI script for updates to cgi_client.py +# # Revision 1.1 2001/07/22 11:47:07 richard # More Grande Splite #