X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/c0e64855a967519169d9c5d8747edbdeb85e49ec..deb49f12aad253039d9b8907dde04b89321f5e49:/code/main.py diff --git a/code/main.py b/code/main.py index 9f57f84..7044167 100755 --- a/code/main.py +++ b/code/main.py @@ -51,11 +51,7 @@ class InvirtUnauthWeb(View): @cherrypy.expose @cherrypy.tools.mako(filename="/unauth.mako") def index(self): - d = dict(simple=True) - if os.path.exists("/etc/invirt/message"): - f = open('/etc/invirt/message') - d['serviceMessage']= f.read() - return d + return dict(simple=True) class InvirtWeb(View): def __init__(self): @@ -524,9 +520,9 @@ def modifyDict(username, state, machine_id, fields): olddisk = {} session.begin() try: - kws = dict([(kw, fields[kw]) for kw in + kws = dict((kw, fields[kw]) for kw in 'owner admin contact name description memory vmtype disksize'.split() - if fields[kw]]) + if fields.get(kw)) kws['machine_id'] = machine_id validate = validation.Validate(username, state, **kws) machine = validate.machine