Code review comment for lp:~carla-sella/ubuntu-rssreader-app/view-feeds-test

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

This is equivalent

    def get_canonical_feed_labelvisual(self):
        itemList = self.select_many('LabelVisual', text = 'Canonical')
        for item in itemList:
            if item.text == "Canonical":
                return item

to this:

    def get_canonical_feed_labelvisual(self):
        itemList = self.app.select_many('LabelVisual', text = 'Canonical')
        index = -1
        for item in itemList:
            index += 1
            if item.text == "Canonical":
               return itemList[index]

See the difference? You can use item directly as it's equal to itemList[index].

« Back to merge proposal