Changeset 153

Show
Ignore:
Timestamp:
10/09/06 17:17:05 (2 years ago)
Author:
mk
Message:

Fixed a corner case of py_pi_download index getting >100%.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cheesecake/cheesecake_index.py

    r152 r153  
    773773 
    774774            if not found_on_cheeseshop: 
    775                 self.value += (distance_from_pypi - 1) * self.distance_penalty 
    776  
    777                 if distance_from_pypi: 
     775                if distance_from_pypi > 0: 
     776                    self.value += (distance_from_pypi - 1) * self.distance_penalty 
    778777                    self.details += " following %d link" % distance_from_pypi 
     778 
    779779                    if distance_from_pypi > 1: 
    780780                        self.details += "s"