From c5de4def3ee8581b5fdafe9bc34f1520e4bc8252 Mon Sep 17 00:00:00 2001 From: Peter Iannucci Date: Thu, 26 Feb 2009 03:22:24 -0500 Subject: [PATCH] Fixed bug pointed out by Broder with vmtype default and XHTML. svn path=/trunk/packages/invirt-web/; revision=2189 --- code/main.py | 2 +- code/templates/functions.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/main.py b/code/main.py index 5de5f9a..e119e0e 100755 --- a/code/main.py +++ b/code/main.py @@ -151,7 +151,7 @@ def parseCreate(username, state, fields): kws = dict([(kw, fields.getfirst(kw)) for kw in 'name description owner memory disksize vmtype cdrom autoinstall'.split()]) validate = validation.Validate(username, state, strict=True, **kws) return dict(contact=username, name=validate.name, description=validate.description, memory=validate.memory, - disksize=validate.disksize, owner=validate.owner, machine_type=validate.vmtype, + disksize=validate.disksize, owner=validate.owner, machine_type=getattr(validate, 'vmtype', Defaults.type), cdrom=getattr(validate, 'cdrom', None), autoinstall=getattr(validate, 'autoinstall', None)) diff --git a/code/templates/functions.tmpl b/code/templates/functions.tmpl index 86dc772..305b4e8 100644 --- a/code/templates/functions.tmpl +++ b/code/templates/functions.tmpl @@ -36,7 +36,7 @@ $databaseList(sorted($database.Autoinstall.query(), key=lambda x: x.description) #for $vmtype in (('linux-hvm', 'HVM'), ('linux', 'ParaVM'), ) #end for -- 1.7.9.5