Changeset 169

Show
Ignore:
Timestamp:
02/01/07 17:43:44 (2 years ago)
Author:
mk
Message:

Fixed URL matching strings for get_pkg_from_pypi (closes ticket #47).

Files:

Legend:

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

    r168 r169  
    776776            if not found_on_cheeseshop: 
    777777                if distance_from_pypi > 0: 
    778                    self.value += (distance_from_pypi - 1) * self.distance_penalty 
     778                    self.value += (distance_from_pypi - 1) * self.distance_penalty 
    779779                    self.details += " following %d link" % distance_from_pypi 
    780780 
     
    15001500            if s: 
    15011501                inspected_url = s.group(1) 
    1502                 if not re.search(r"www.python.org\/pypi", inspected_url)
     1502                if "python.org/pypi" not in inspected_url
    15031503                    self.distance_from_pypi += 1 
    15041504                continue 
     
    15151515            self.found_locally = True 
    15161516 
    1517         if re.search(r"cheeseshop.python.org", self.download_url)
     1517        if "cheeseshop.python.org" in self.download_url
    15181518            self.found_on_cheeseshop = True 
    15191519