summaryrefslogtreecommitdiffstats
path: root/openstack/common/db/sqlalchemy/utils.py
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2013-05-01 10:25:40 -0500
committerChuck Short <chuck.short@canonical.com>2013-05-01 10:34:16 -0500
commit46e6c86ed42bf3f93ea918e83ab186de18e4c3dd (patch)
treefb25bcc3755517a3ae500e144af46818eccc7813 /openstack/common/db/sqlalchemy/utils.py
parent0c9047cc334578f9f4974c3bc006ba9bc62814d2 (diff)
downloadoslo-46e6c86ed42bf3f93ea918e83ab186de18e4c3dd.tar.gz
oslo-46e6c86ed42bf3f93ea918e83ab186de18e4c3dd.tar.xz
oslo-46e6c86ed42bf3f93ea918e83ab186de18e4c3dd.zip
Use range rather than xrange
Use range rather than xrange to improve python3 compatibiltiy. Change-Id: I5a4434bbd2e5d509f84c3aa668eea8e46262816f Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'openstack/common/db/sqlalchemy/utils.py')
-rw-r--r--openstack/common/db/sqlalchemy/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack/common/db/sqlalchemy/utils.py b/openstack/common/db/sqlalchemy/utils.py
index 31a22e0..e89ec10 100644
--- a/openstack/common/db/sqlalchemy/utils.py
+++ b/openstack/common/db/sqlalchemy/utils.py
@@ -105,9 +105,9 @@ def paginate_query(query, model, limit, sort_keys, marker=None,
# Build up an array of sort criteria as in the docstring
criteria_list = []
- for i in xrange(0, len(sort_keys)):
+ for i in range(0, len(sort_keys)):
crit_attrs = []
- for j in xrange(0, i):
+ for j in range(0, i):
model_attr = getattr(model, sort_keys[j])
crit_attrs.append((model_attr == marker_values[j]))