Ticket #4720: syndication-500.diff

File syndication-500.diff, 1020 bytes (added by Bill Fenner <fenner@…>, 8 years ago)
  • contrib/syndication/feeds.py

     
    5151                return attr()
    5252        return attr
    5353
    54     def get_feed(self, url=None):
     54    def get_object(self, bits):
     55        return None
     56
     57    def get_feed(self, url=""):
    5558        """
    5659        Returns a feedgenerator.DefaultFeed object, fully populated, for
    5760        this feed. Raises FeedDoesNotExist for invalid parameters.
    5861        """
    59         if url:
    60             try:
    61                 obj = self.get_object(url.split('/'))
    62             except (AttributeError, ObjectDoesNotExist):
    63                 raise FeedDoesNotExist
    64         else:
    65             obj = None
     62        try:
     63            obj = self.get_object(url.split('/'))
     64        except (AttributeError, ObjectDoesNotExist):
     65            raise FeedDoesNotExist
    6666
    6767        current_site = Site.objects.get_current()
    6868        link = self.__get_dynamic_attr('link', obj)
Back to Top