Commits

Ronny Pfannschmidt  committed 305fc0b

fix fork finding for new bb ui

  • Participants
  • Parent commits b069d95

Comments (0)

Files changed (1)

         raise util.Abort('getting bitbucket page failed with:\n%s' % e)
 
     try:
-        forklist = tree.findall('//dd[@class="name"]')
+        # there are 2 ol for the listings, first is forks, second is mqs
+        descendants = tree.find('//ol[@class="detailed iterable"]')[0]
+        forklist = descendants.findall('.//dd[@class="name"]')
         # Item 0 is a link to the user profile and item 1 is the link to the
         # forked repo.
-        urls = [a.findall("a")[1].attrib['href'][:-9] for a in forklist]
+        urls = [a.findall("a")[1].attrib['href'] for a in forklist]
         if not urls:
             return []
     except Exception, e: