From 78f083da7af3281bdfd9c8a1bec545fd59bf82da Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 13 Aug 2013 10:26:22 +0530 Subject: [PATCH] [minor] [patching] Show a nice message when system is upgrading webnotes/wnframework#178 --- public/html/web.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/public/html/web.py b/public/html/web.py index 798c296667..5b28424905 100755 --- a/public/html/web.py +++ b/public/html/web.py @@ -20,6 +20,20 @@ sys.path.append('../app') import conf +session_stopped = """ + + + Session Stopped + + +
+ Upgrading... +

We will be back in a few moments.

+
+ +""" + def init(): import webnotes.handler webnotes.handler.get_cgi_fields() @@ -27,7 +41,12 @@ def init(): def respond(): import webnotes import webnotes.webutils - return webnotes.webutils.render(webnotes.form_dict.get('page')) + try: + return webnotes.webutils.render(webnotes.form_dict.get('page')) + except webnotes.SessionStopped: + print "Content-type: text/html" + print + print session_stopped if __name__=="__main__": init()