From f0ac56b5fd2e62b0483654f7bb4381f7554e4646 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Sun, 28 Apr 2013 16:25:51 +1000 Subject: Remove local variable only used in logging. Kill off the locals() call as well. Just directly calculate the value. Change-Id: I6b96d08a16feb125d1eb9162ca186bf37b429cd6 --- nova/scheduler/filter_scheduler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nova/scheduler/filter_scheduler.py b/nova/scheduler/filter_scheduler.py index db871dee9..d18eaedd6 100644 --- a/nova/scheduler/filter_scheduler.py +++ b/nova/scheduler/filter_scheduler.py @@ -70,9 +70,8 @@ class FilterScheduler(driver.Scheduler): 'scheduler.run_instance.start', notifier.INFO, payload) instance_uuids = request_spec.pop('instance_uuids') - num_instances = len(instance_uuids) - LOG.debug(_("Attempting to build %(num_instances)d instance(s)") % - locals()) + LOG.debug(_("Attempting to build %(num_instances)d instance(s)"), + {'num_instances': len(instance_uuids)}) weighed_hosts = self._schedule(context, request_spec, filter_properties, instance_uuids) -- cgit