diff options
author | Jay Lau <liugya@cn.ibm.com> | 2013-10-19 11:03:06 +0800 |
---|---|---|
committer | Jay Lau <liugya@cn.ibm.com> | 2013-10-19 11:05:25 +0800 |
commit | 2c079a876c4a5130a187862d365b1969ca1ef0d1 (patch) | |
tree | 843da94e3089231072586974c99b354ac0abc779 /nova | |
parent | 2b9c147626ff82c86a400c420b928bf2e321c531 (diff) | |
download | nova-2c079a876c4a5130a187862d365b1969ca1ef0d1.tar.gz |
Fix i18n issue for nova/compute/manager.py
There are some log message in nova/compute/manager.py does not follow
I18n coding style, we should update this.
Change-Id: Ia566b5377e27bc9883a3d191346ba4a83df385ff
Diffstat (limited to 'nova')
-rw-r--r-- | nova/compute/manager.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index a27863cb10..fea222cfcd 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1560,7 +1560,7 @@ class ComputeManager(manager.SchedulerDependentManager): except Exception: # Should not reach here. self._set_instance_error_state(context, instance['uuid']) - msg = 'Unexpected build failure, not rescheduling build.' + msg = _('Unexpected build failure, not rescheduling build.') LOG.exception(msg, instance=instance) do_build_and_run_instance(context, instance, image, request_spec, @@ -1591,7 +1591,7 @@ class ComputeManager(manager.SchedulerDependentManager): raise exception.RescheduledException( instance_uuid=instance['uuid'], reason='') except Exception: - LOG.exception('Instance failed to spawn', instance=instance) + LOG.exception(_('Instance failed to spawn'), instance=instance) raise exception.RescheduledException( instance_uuid=instance['uuid'], reason='') @@ -2704,8 +2704,8 @@ class ComputeManager(manager.SchedulerDependentManager): vm_state = None if p_state == power_state.SHUTDOWN: vm_state = vm_states.STOPPED - LOG.debug("Resized/migrated instance is powered off. " - "Setting vm_state to '%s'." % vm_state, + LOG.debug(_("Resized/migrated instance is powered off. " + "Setting vm_state to '%s'."), vm_state, instance=instance) else: vm_state = vm_states.ACTIVE @@ -2890,7 +2890,7 @@ class ComputeManager(manager.SchedulerDependentManager): # NOTE(mriedem): Stash the old vm_state so we can set the # resized/reverted instance back to the same state later. vm_state = instance['vm_state'] - LOG.debug('Stashing vm_state: %s' % vm_state, instance=instance) + LOG.debug(_('Stashing vm_state: %s'), vm_state, instance=instance) sys_meta['old_vm_state'] = vm_state instance.save() |