From: Greg Price <price@mit.edu>
Date: Sun, 20 Dec 2009 03:00:02 +0000 (-0500)
Subject: main.py: small Python style improvement
X-Git-Tag: 0.1.0^2~15
X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/d7bc5fe65d556f4174757e657b3c7614289f7186

main.py: small Python style improvement

svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2720
---

diff --git a/code/main.py b/code/main.py
index 3655352..7c04d25 100755
--- a/code/main.py
+++ b/code/main.py
@@ -442,16 +442,13 @@ def getListDict(username, state):
             m.uptime = None
         else:
             m.uptime = xmlist[m]['uptime']
+            installing[m] = bool(xmlist[m].get('autoinstall'))
             if xmlist[m]['console']:
                 has_vnc[m] = True
             elif m.type.hvm:
                 has_vnc[m] = "WTF?"
             else:
                 has_vnc[m] = "ParaVM"
-            if xmlist[m].get('autoinstall'):
-                installing[m] = True
-            else:
-                installing[m] = False
     max_memory = validation.maxMemory(username, state)
     max_disk = validation.maxDisk(username)
     checkpoint.checkpoint('Got max mem/disk')