Fixed incorrect error message
Added missing import Fixed Typo (pylint "undefined variable NoneV")
This commit is contained in:
parent
f0c4767dc1
commit
c680176d11
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user