Range() in for loop need a refactor

Bug #1259560 reported by Wu Wenxiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Wu Wenxiang

Bug Description

In some files, range was called as:
    for i in range(0, 10):
        pass
Actually the start index arg was useless, since its defaultvalue is 0.
They should be refactor as:
    for i in range(10):
        pass

Changed in neutron:
assignee: nobody → Wu Wenxiang (wu-wenxiang)
Changed in neutron:
status: New → In Progress
Revision history for this message
Wu Wenxiang (wu-wenxiang) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/61100
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=74f0b74b55c97dda1ffd84a6fcab3f7c6478b50f
Submitter: Jenkins
Branch: master

commit 74f0b74b55c97dda1ffd84a6fcab3f7c6478b50f
Author: Wu Wenxiang <wu.wenxiang@99cloud.net>
Date: Tue Dec 10 20:42:07 2013 +0800

    Remove start index 0 in range()

    Remove the useless arg ("start index" = 0) in files, since its default
    value is 0, to make code cleaner.

    Fixes bug #1259560

    Change-Id: Id595630f97b21cc84aefc39b31e7f09f5fb8deb9

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.