fix in session stopper error display
This commit is contained in:
parent
bef8b86331
commit
da27db4c7d
17
index.cgi
17
index.cgi
@ -38,10 +38,25 @@ def init():
|
|||||||
# init request
|
# init request
|
||||||
try:
|
try:
|
||||||
webnotes.http_request = webnotes.auth.HTTPRequest()
|
webnotes.http_request = webnotes.auth.HTTPRequest()
|
||||||
|
return True
|
||||||
except webnotes.AuthenticationError, e:
|
except webnotes.AuthenticationError, e:
|
||||||
pass
|
pass
|
||||||
except webnotes.UnknownDomainError, e:
|
except webnotes.UnknownDomainError, e:
|
||||||
print "Location: " + (webnotes.defs.redirect_404)
|
print "Location: " + (webnotes.defs.redirect_404)
|
||||||
|
except webnotes.SessionStopped, e:
|
||||||
|
if 'cmd' in webnotes.form_dict:
|
||||||
|
webnotes.handler.print_json()
|
||||||
|
else:
|
||||||
|
print "Content-Type: text/html"
|
||||||
|
print
|
||||||
|
print """<html>
|
||||||
|
<body style="background-color: #EEE;">
|
||||||
|
<h3 style="width: 900px; background-color: #FFF; border: 2px solid #AAA; padding: 20px; font-family: Arial; margin: 20px auto">
|
||||||
|
Updating.
|
||||||
|
We will be back in a few moments...
|
||||||
|
</h3>
|
||||||
|
</body>
|
||||||
|
</html>"""
|
||||||
|
|
||||||
def respond():
|
def respond():
|
||||||
import webnotes
|
import webnotes
|
||||||
@ -55,5 +70,5 @@ def respond():
|
|||||||
print webnotes.cms.index.get()
|
print webnotes.cms.index.get()
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
init()
|
if init():
|
||||||
respond()
|
respond()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user