import sys
import time
import urllib
+import random
from StringIO import StringIO
def revertStandardError():
elif back == 'info':
machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine
return ({'Status': '303 See Other',
- 'Location': '/info?machine_id=%d' % machine.machine_id},
+ 'Location': 'info?machine_id=%d' % machine.machine_id},
"You shouldn't see this message.")
else:
raise InvalidInput('back', back, 'Not a known back page.')
return templates.unauth(searchList=[{'simple' : True}])
def overlord(username, state, path, fields):
+ if path == '':
+ return ({'Status': '303 See Other',
+ 'Location': 'overlord/'},
+ "You shouldn't see this message.")
if not username in getAfsGroupMembers('system:xvm', 'athena.mit.edu'):
raise InvalidInput('username', username, 'Not an overlord.')
newstate = State(username, overlord=True)
self.state = State(self.username)
self.state.environ = environ
+ random.seed() #sigh
+
def __iter__(self):
start_time = time.time()
sipb_xen_database.clear_cache()
fields = cgi.FieldStorage(fp=self.environ['wsgi.input'], environ=self.environ)
operation = self.environ.get('PATH_INFO', '')
if not operation:
- self.start("301 Moved Permanently", [('Location',
- self.environ['SCRIPT_NAME']+'/')])
+ self.start("301 Moved Permanently", [('Location', './')])
return
if self.username is None:
operation = 'unauth'