fixed problem with ENABLED/DISABLED, issue 1689
This commit is contained in:
+2
-9
@@ -396,15 +396,8 @@ def wsgibase(environ, responder):
|
||||
raise HTTP(404, rwthread.routes.error_message
|
||||
% 'invalid request',
|
||||
web2py_error='invalid application')
|
||||
elif request.is_local and exists(disabled):
|
||||
data = dict([item.strip() for item in line.split(':',1)]
|
||||
for line in open(disabled) if line.strip())
|
||||
if data.get('disabled','True').lower() != 'false':
|
||||
if 'redirect' in data:
|
||||
redirect(data['redirect'])
|
||||
if 'message' in data:
|
||||
raise HTTP(503, data['message'])
|
||||
raise HTTP(503, "<html><body><h1>Temporarily down for maintenance</h1></body></html>")
|
||||
elif not request.is_local and exists(disabled):
|
||||
raise HTTP(503, "<html><body><h1>Temporarily down for maintenance</h1></body></html>")
|
||||
|
||||
# ##################################################
|
||||
# build missing folders
|
||||
|
||||
Reference in New Issue
Block a user