|
16 | 16 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
17 | 17 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
18 | 18 | # |
19 | | -# $Id: roundup.cgi,v 1.25 2002-08-22 00:14:18 richard Exp $ |
| 19 | +# $Id: roundup.cgi,v 1.26 2002-09-04 01:58:33 richard Exp $ |
20 | 20 |
|
21 | 21 | # python version check |
22 | 22 | from roundup import version_check |
@@ -99,7 +99,7 @@ def checkconfig(): |
99 | 99 | if logname: |
100 | 100 | LOG = open(logname, 'a') |
101 | 101 |
|
102 | | - # ROUNDUP_DEBUG is checked directly in "roundup.cgi_client" |
| 102 | + # ROUNDUP_DEBUG is checked directly in "roundup.cgi.client" |
103 | 103 |
|
104 | 104 |
|
105 | 105 | # |
@@ -142,20 +142,20 @@ def main(out, err): |
142 | 142 | else: |
143 | 143 | instance_home = ROUNDUP_INSTANCE_HOMES[instance] |
144 | 144 | instance = roundup.instance.open(instance_home) |
145 | | - from roundup import cgi_client |
146 | | - client = instance.Client(instance, request, os.environ) |
| 145 | + from roundup.cgi import client |
| 146 | + c = instance.Client(instance, request, os.environ) |
147 | 147 | try: |
148 | | - client.main() |
149 | | - except cgi_client.Unauthorised: |
| 148 | + c.main() |
| 149 | + except client.Unauthorised: |
150 | 150 | request.send_response(403) |
151 | 151 | request.send_header('Content-Type', 'text/html') |
152 | 152 | request.end_headers() |
153 | 153 | out.write('Unauthorised') |
154 | | - except cgi_client.NotFound: |
| 154 | + except client.NotFound: |
155 | 155 | request.send_response(404) |
156 | 156 | request.send_header('Content-Type', 'text/html') |
157 | 157 | request.end_headers() |
158 | | - out.write('Not found: %s'%client.path) |
| 158 | + out.write('Not found: %s'%c.path) |
159 | 159 |
|
160 | 160 | else: |
161 | 161 | import urllib |
@@ -198,6 +198,9 @@ LOG.close() |
198 | 198 |
|
199 | 199 | # |
200 | 200 | # $Log: not supported by cvs2svn $ |
| 201 | +# Revision 1.25 2002/08/22 00:14:18 richard |
| 202 | +# Fix to be able to report errors even if the cgi module can't be imported(!) |
| 203 | +# |
201 | 204 | # Revision 1.24 2002/01/05 02:21:22 richard |
202 | 205 | # fixes |
203 | 206 | # |
|
0 commit comments