From 9d9939d8785d92c4aed2873f98457baff593984b Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Thu, 19 Apr 2012 17:23:54 +0000 Subject: Include name being searched for in exception message Otherwise, it's not always clear what was happening while looking at logs. Also, remove unused instance kwarg, this isn't a logging call. Change-Id: Ib1be2d7ed5b3c658dc2a3ac4094b812ba95a5d3c --- nova/virt/xenapi/vmops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 6883e9c8c..2f34e4641 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -579,8 +579,8 @@ class VMOps(object): def _get_vm_opaque_ref(self, instance): vm_ref = VMHelper.lookup(self._session, instance['name']) if vm_ref is None: - raise exception.NotFound(_('Could not find VM by name'), - instance=instance) + raise exception.NotFound(_('Could not find VM with name %s') % + instance['name']) return vm_ref def _acquire_bootlock(self, vm): -- cgit