From d8276b5c303ed6bb8e0596e6332bad50f1b7fb71 Mon Sep 17 00:00:00 2001
From: Paul Weaver
Date: Wed, 30 Dec 2009 15:42:23 -0500
Subject: [PATCH] Moved all code for service messages to unauth.make
svn path=/trunk/packages/invirt-web/; revision=2814
---
code/main.py | 6 +-----
code/templates/unauth.mako | 5 +++--
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/code/main.py b/code/main.py
index 9f57f84..ecf0305 100755
--- a/code/main.py
+++ b/code/main.py
@@ -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):
diff --git a/code/templates/unauth.mako b/code/templates/unauth.mako
index 08dd617..ec67c80 100644
--- a/code/templates/unauth.mako
+++ b/code/templates/unauth.mako
@@ -13,9 +13,10 @@ own complete system on which you can start from our three-minute
Debian or Ubuntu install or install the operating
system of your choice. The service is free
to any Athena account holder.
-%if serviceMessage:
+
+%if os.path.exists("/etc/invirt/message"):
-
${serviceMessage}
+
${open('/etc/invirt/message').read()}
%endif
--
1.7.9.5