Fix iterator issues with Python3

Partially implements: blueprint python-3
Change-Id: If71143c67aca5bc1ca9f09d51587531a08b6bf89
This commit is contained in:
Hiroaki Kobayashi 2018-01-11 16:21:57 +09:00
parent 7c8be636c2
commit e36a9b087c
3 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ def make_app():
and 'physical.host.plugin' in cfg.CONF.manager.plugins):
app.register_blueprint(host_api_v1_0.rest, url_prefix='/v1/os-hosts')
for code in werkzeug_exceptions.default_exceptions.iterkeys():
for code in werkzeug_exceptions.default_exceptions:
app.error_handler_spec[None][code] = make_json_error
if cfg.CONF.debug and not cfg.CONF.log_exchange:

View File

@ -93,7 +93,7 @@ class Constraint(object):
self.conditions = conditions
def apply(self, model, query):
for key, condition in self.conditions.iteritems():
for key, condition in self.conditions.items():
for clause in condition.clauses(getattr(model, key)):
query = query.filter(clause)
return query

View File

@ -44,7 +44,7 @@ class BlazarException(Exception):
# kwargs doesn't match a variable in the message
# log the issue and the kwargs
LOG.exception('Exception in string format operation')
for name, value in kwargs.iteritems():
for name, value in kwargs.items():
LOG.error("%(name)s: %(value)s",
{'name': name, 'value': value})