X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/564b08ea0b7b6414d8eccef0fd00ba8ccdb591da..bee5d6b79f93e627eb105cd443701ac1975fd927:/code/main.py?ds=inline diff --git a/code/main.py b/code/main.py index d17ed97..c419f32 100755 --- a/code/main.py +++ b/code/main.py @@ -210,6 +210,9 @@ def getListDict(user): owner=user, cdrom='gutsy-i386') checkpoint.checkpoint('Got defaults') + def sortkey(machine): + return (machine.owner != user, machine.owner, machine.name) + machines = sorted(machines, key=sortkey) d = dict(user=user, cant_add_vm=validation.cantAddVm(user), max_memory=max_memory,