Skip to content

Commit 84cf04a

Browse files
author
Richard Jones
committed
fix cgi client importing
1 parent fd09468 commit 84cf04a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

cgi-bin/roundup.cgi

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
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 $
2020

2121
# python version check
2222
from roundup import version_check
@@ -99,7 +99,7 @@ def checkconfig():
9999
if logname:
100100
LOG = open(logname, 'a')
101101

102-
# ROUNDUP_DEBUG is checked directly in "roundup.cgi_client"
102+
# ROUNDUP_DEBUG is checked directly in "roundup.cgi.client"
103103

104104

105105
#
@@ -142,20 +142,20 @@ def main(out, err):
142142
else:
143143
instance_home = ROUNDUP_INSTANCE_HOMES[instance]
144144
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)
147147
try:
148-
client.main()
149-
except cgi_client.Unauthorised:
148+
c.main()
149+
except client.Unauthorised:
150150
request.send_response(403)
151151
request.send_header('Content-Type', 'text/html')
152152
request.end_headers()
153153
out.write('Unauthorised')
154-
except cgi_client.NotFound:
154+
except client.NotFound:
155155
request.send_response(404)
156156
request.send_header('Content-Type', 'text/html')
157157
request.end_headers()
158-
out.write('Not found: %s'%client.path)
158+
out.write('Not found: %s'%c.path)
159159

160160
else:
161161
import urllib
@@ -198,6 +198,9 @@ LOG.close()
198198

199199
#
200200
# $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+
#
201204
# Revision 1.24 2002/01/05 02:21:22 richard
202205
# fixes
203206
#

0 commit comments

Comments
 (0)