Ticket #5855: patch-5855-2.diff

File patch-5855-2.diff, 1.0 KB (added by Niran Babalola <niran@…>, 17 years ago)

revised patch

  • django/contrib/syndication/feeds.py

     
    5555                return attr()
    5656        return attr
    5757
     58    def get_object(self, bits):
     59        return None
     60
    5861    def get_feed(self, url=None):
    5962        """
    6063        Returns a feedgenerator.DefaultFeed object, fully populated, for
    6164        this feed. Raises FeedDoesNotExist for invalid parameters.
    6265        """
    6366        if url:
    64             try:
    65                 obj = self.get_object(url.split('/'))
    66             except (AttributeError, ObjectDoesNotExist):
    67                 raise FeedDoesNotExist
     67            bits = url.split('/')
    6868        else:
    69             obj = None
     69            bits = []
    7070
     71        try:
     72            obj = self.get_object(bits)
     73        except ObjectDoesNotExist:
     74            raise FeedDoesNotExist
     75
    7176        if Site._meta.installed:
    7277            current_site = Site.objects.get_current()
    7378        else:
Back to Top