From 4698b7b931d5f0945ec34d36b26ac39bbf309bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9la=20Vancsics?= Date: Thu, 16 Mar 2017 07:23:46 +0100 Subject: [PATCH] Remove unused variable TrivialFix Change-Id: I9483695a4ad9a1aa3ae26afd9b760891376c23c6 --- neutron/db/migration/cli.py | 2 +- neutron/services/metering/drivers/iptables/iptables_driver.py | 2 +- neutron/services/provider_configuration.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neutron/db/migration/cli.py b/neutron/db/migration/cli.py index 080673edfe8..2c7af24f89f 100644 --- a/neutron/db/migration/cli.py +++ b/neutron/db/migration/cli.py @@ -623,7 +623,7 @@ def get_alembic_configs(): script_location = _get_subproject_script_location(CONF.subproject) script_locations[CONF.subproject] = script_location else: - for subproject, ep in migration_entrypoints.items(): + for subproject in migration_entrypoints: script_locations[subproject] = _get_subproject_script_location( subproject) diff --git a/neutron/services/metering/drivers/iptables/iptables_driver.py b/neutron/services/metering/drivers/iptables/iptables_driver.py index 3c4971b43fb..c6d662299b6 100644 --- a/neutron/services/metering/drivers/iptables/iptables_driver.py +++ b/neutron/services/metering/drivers/iptables/iptables_driver.py @@ -395,7 +395,7 @@ class IptablesMeteringDriver(abstract_driver.MeteringAbstractDriver): if not rm: continue - for label_id, label in rm.metering_labels.items(): + for label_id in rm.metering_labels: try: chain = iptables_manager.get_chain_name(WRAP_NAME + LABEL + diff --git a/neutron/services/provider_configuration.py b/neutron/services/provider_configuration.py index cbe4849706a..ad4321ae2ef 100644 --- a/neutron/services/provider_configuration.py +++ b/neutron/services/provider_configuration.py @@ -221,7 +221,7 @@ class ProviderConfiguration(object): self.add_provider(prov) def _ensure_driver_unique(self, driver): - for k, v in self.providers.items(): + for v in self.providers.values(): if v['driver'] == driver: msg = (_("Driver %s is not unique across providers") % driver)