Mirror penalities are floats while they're intended to be integers

Bug #540102 reported by David Smid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Smart Package Manager
New
Undecided
Unassigned

Bug Description

This code in mirror.py should perform floor division but does not:

                # Integer division by granularity ensures that mirrors
                # which are close enough will be considered equal to
                # distribute load.
                penality /= GRANULARITY

penality is a float, thus the result is float as well.
Since Python 2.2, there's a new operator // that does floor division regardless of operands type:

                penality //= GRANULARITY

See http://www.python.org/dev/peps/pep-0238/

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.