comparison roundup-server @ 54:b68bcb176d1a

disabled the reloading until it can be done properly
author Richard Jones <richard@users.sourceforge.net>
date Mon, 23 Jul 2001 10:31:45 +0000
parents 33bfce110d1e
children 820c8bb1b71a
comparison
equal deleted inserted replaced
53:a117296dd59c 54:b68bcb176d1a
1 #!/usr/bin/python 1 #!/usr/bin/python
2 """ HTTP Server that serves roundup. 2 """ HTTP Server that serves roundup.
3 3
4 Stolen from CGIHTTPServer 4 Stolen from CGIHTTPServer
5 5
6 $Id: roundup-server,v 1.3 2001-07-23 08:53:44 richard Exp $ 6 $Id: roundup-server,v 1.4 2001-07-23 10:31:45 richard Exp $
7 7
8 """ 8 """
9 import sys 9 import sys
10 if int(sys.version[0]) < 2: 10 if int(sys.version[0]) < 2:
11 print "Content-Type: text/plain\n" 11 print "Content-Type: text/plain\n"
21 import SimpleHTTPServer 21 import SimpleHTTPServer
22 22
23 # Roundup modules of use here 23 # Roundup modules of use here
24 from roundup import cgitb, cgi_client 24 from roundup import cgitb, cgi_client
25 25
26 # These are here temporarily until I get a real reload system in place
27 from roundup import date, hyperdb, hyper_bsddb, roundupdb, htmltemplate
28
29 # 26 #
30 ## Configuration 27 ## Configuration
31 # 28 #
32 29
33 # This indicates where the Roundup instance lives 30 # This indicates where the Roundup instance lives
34 ROUNDUP_INSTANCE_HOMES = { 31 ROUNDUP_INSTANCE_HOMES = {
35 'test': '/tmp/roundup_test', 32 'bar': '/tmp/bar',
36 } 33 }
37 34
38 # Where to log debugging information to. Use an instance of DevNull if you 35 # Where to log debugging information to. Use an instance of DevNull if you
39 # don't want to log anywhere. 36 # don't want to log anywhere.
40 # TODO: actually use this stuff 37 # TODO: actually use this stuff
144 nobody = nobody_uid() 141 nobody = nobody_uid()
145 os.setuid(nobody) 142 os.setuid(nobody)
146 143
147 # reload all modules 144 # reload all modules
148 # TODO check for file timestamp changes and dependencies 145 # TODO check for file timestamp changes and dependencies
149 reload(date) 146 #reload(date)
150 reload(hyperdb) 147 #reload(hyperdb)
151 reload(roundupdb) 148 #reload(roundupdb)
152 reload(htmltemplate) 149 #reload(htmltemplate)
153 reload(cgi_client) 150 #reload(cgi_client)
154 sys.path.insert(0, module_path) 151 #sys.path.insert(0, module_path)
155 try: 152 #try:
156 reload(instance) 153 # reload(instance)
157 finally: 154 #finally:
158 del sys.path[0] 155 # del sys.path[0]
159 156
160 # initialise the roundupdb, check for auth 157 # initialise the roundupdb, check for auth
161 db = instance.open('admin') 158 db = instance.open('admin')
162 message = 'Unauthorised' 159 message = 'Unauthorised'
163 auth = self.headers.getheader('authorization') 160 auth = self.headers.getheader('authorization')
218 print 'Roundup server started on', address 215 print 'Roundup server started on', address
219 httpd.serve_forever() 216 httpd.serve_forever()
220 217
221 # 218 #
222 # $Log: not supported by cvs2svn $ 219 # $Log: not supported by cvs2svn $
220 # Revision 1.3 2001/07/23 08:53:44 richard
221 # Fixed the ROUNDUPS decl in roundup-server
222 # Move the installation notes to INSTALL
223 #
223 # Revision 1.2 2001/07/23 04:05:05 anthonybaxter 224 # Revision 1.2 2001/07/23 04:05:05 anthonybaxter
224 # actually quit if python version wrong 225 # actually quit if python version wrong
225 # 226 #
226 # Revision 1.1 2001/07/23 03:46:48 richard 227 # Revision 1.1 2001/07/23 03:46:48 richard
227 # moving the bin files to facilitate out-of-the-boxness 228 # moving the bin files to facilitate out-of-the-boxness

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