Fixed incorrect error message

Added missing import
Fixed Typo (pylint "undefined variable NoneV")
This commit is contained in:
Alex Meade 2011-06-07 13:32:53 -04:00
parent f0c4767dc1
commit c680176d11
3 changed files with 3 additions and 2 deletions

View File

@ -114,7 +114,7 @@ def get_instance_type(id):
ctxt = context.get_admin_context()
return db.instance_type_get_by_id(ctxt, id)
except exception.DBError:
raise exception.ApiError(_("Unknown instance type: %s") % name)
raise exception.ApiError(_("Unknown instance type: %s") % id)
def get_instance_type_by_name(name):

View File

@ -36,6 +36,7 @@ from twisted.application import service
from nova import flags
from nova import log as logging
from nova import utils
from nova.virt import connection as virt_connection

View File

@ -119,7 +119,7 @@ class VMRCSessionConsole(VMRCConsole):
"""
vms = vim_session._call_method(vim_util, 'get_objects',
'VirtualMachine', ['name'])
vm_ref = NoneV
vm_ref = None
for vm in vms:
if vm.propSet[0].val == instance_name:
vm_ref = vm.obj