Moved all code for service messages to unauth.make
authorPaul Weaver <pweaver@mit.edu>
Wed, 30 Dec 2009 20:42:23 +0000 (15:42 -0500)
committerPaul Weaver <pweaver@mit.edu>
Wed, 30 Dec 2009 20:42:23 +0000 (15:42 -0500)
svn path=/trunk/packages/invirt-web/; revision=2814

code/main.py
code/templates/unauth.mako

index 9f57f84..ecf0305 100755 (executable)
@@ -51,11 +51,7 @@ class InvirtUnauthWeb(View):
     @cherrypy.expose
     @cherrypy.tools.mako(filename="/unauth.mako")
     def index(self):
-        d = dict(simple=True)
-        if os.path.exists("/etc/invirt/message"):
-            f = open('/etc/invirt/message')
-            d['serviceMessage']= f.read()
-        return d
+        return dict(simple=True)
 
 class InvirtWeb(View):
     def __init__(self):
index 08dd617..ec67c80 100644 (file)
@@ -13,9 +13,10 @@ own complete system on which you can start from our <strong>three-minute
 Debian or Ubuntu install</strong> or install the <strong>operating
 system of your choice</strong>.  The service is <strong>free</strong>
 to any Athena account holder.</p>
-%if serviceMessage:
+
+%if os.path.exists("/etc/invirt/message"):
 <div class="result">
-<p class="error">${serviceMessage}</p>
+<p class="error">${open('/etc/invirt/message').read()}</p>
 </div>
 %endif