]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replace xrange() with six.moves.range()
authorVictor Stinner <vstinner@redhat.com>
Mon, 25 May 2015 15:08:00 +0000 (17:08 +0200)
committerVictor Stinner <vstinner@redhat.com>
Tue, 16 Jun 2015 08:46:40 +0000 (10:46 +0200)
commit8e63cccb652cfc4bba58c5068466a588a7094376
tree4131dae68fc49102f12213a65ca6c7eb100ab325
parent106261582f10453de2ba9a2218e6ac5452811a5e
Replace xrange() with six.moves.range()

Add "from six.moves import range" to replace the builtin range()
function with six.moves.range() to always create an iterator, instead of
creating a temporary list.

Replace "xrange" with "range".

Don't add the import for ranges of 1024 items or less.

Blueprint cinder-python3
Change-Id: If618b4e810e444f7eb6592bb2398805e9d14d548
24 files changed:
cinder/backup/drivers/ceph.py
cinder/common/sqlalchemyutils.py
cinder/image/glance.py
cinder/tests/unit/api/openstack/test_wsgi.py
cinder/tests/unit/api/v1/test_limits.py
cinder/tests/unit/api/v2/test_limits.py
cinder/tests/unit/api/v2/test_volumes.py
cinder/tests/unit/backup/drivers/test_backup_nfs.py
cinder/tests/unit/scheduler/test_chance_weigher.py
cinder/tests/unit/scheduler/test_host_manager.py
cinder/tests/unit/test_backup_ceph.py
cinder/tests/unit/test_backup_swift.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_utils.py
cinder/tests/unit/test_volume.py
cinder/volume/drivers/emc/emc_vnx_cli.py
cinder/volume/drivers/eqlx.py
cinder/volume/drivers/netapp/eseries/host_mapper.py
cinder/volume/drivers/srb.py
cinder/volume/drivers/violin/v6000_common.py
cinder/volume/drivers/violin/v6000_fcp.py
cinder/volume/drivers/violin/v6000_iscsi.py
cinder/volume/utils.py
doc/ext/cinder_todo.py