main.py: small Python style improvement
authorGreg Price <price@mit.edu>
Sun, 20 Dec 2009 03:00:02 +0000 (22:00 -0500)
committerGreg Price <price@mit.edu>
Sun, 20 Dec 2009 03:00:02 +0000 (22:00 -0500)
svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2720

code/main.py

index 3655352..7c04d25 100755 (executable)
@@ -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')