diff --git a/blazar/api/v1/app.py b/blazar/api/v1/app.py index a02180f2..929b5336 100644 --- a/blazar/api/v1/app.py +++ b/blazar/api/v1/app.py @@ -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: diff --git a/blazar/db/sqlalchemy/api.py b/blazar/db/sqlalchemy/api.py index 28aa7cc9..efb9cfe1 100644 --- a/blazar/db/sqlalchemy/api.py +++ b/blazar/db/sqlalchemy/api.py @@ -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 diff --git a/blazar/exceptions.py b/blazar/exceptions.py index ac89594c..c2a05521 100644 --- a/blazar/exceptions.py +++ b/blazar/exceptions.py @@ -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})