Django

Code

Changeset 7353

Show
Ignore:
Timestamp:
03/23/08 05:14:32 (8 months ago)
Author:
mtredinnick
Message:

Fixed a problem in the backwards-compat abilities of the paginator. Calling count() on a list throws a TypeError? not an AttributeError?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/paginator.py

    r7306 r7353  
    174174            try: 
    175175                self._count = self.object_list.count() 
    176             except AttributeError: 
     176            except TypeError: 
    177177                self._count = len(self.object_list) 
    178178        return self._count