Fixed some style errors
authorPaul Weaver <pweaver@mit.edu>
Wed, 30 Dec 2009 20:24:27 +0000 (15:24 -0500)
committerPaul Weaver <pweaver@mit.edu>
Wed, 30 Dec 2009 20:24:27 +0000 (15:24 -0500)
svn path=/trunk/packages/invirt-web/; revision=2811

code/main.py

index b05906e..9f57f84 100755 (executable)
@@ -51,14 +51,12 @@ class InvirtUnauthWeb(View):
     @cherrypy.expose
     @cherrypy.tools.mako(filename="/unauth.mako")
     def index(self):
-        if(os.path.exists("/etc/invirt/message")):
+        d = dict(simple=True)
+        if os.path.exists("/etc/invirt/message"):
             f = open('/etc/invirt/message')
-            message = f.read()
-        else:message = None
-        d = dict(simple = True, serviceMessage = message)
+            d['serviceMessage']= f.read()
         return d
 
-
 class InvirtWeb(View):
     def __init__(self):
         super(self.__class__,self).__init__()