[1.4.x] -- Fixed Python 2.5 compatibility issues
This commit is contained in:
parent
1f537335d9
commit
4dba4ed548
|
@ -131,7 +131,7 @@ class FieldListFilter(ListFilter):
|
|||
def queryset(self, request, queryset):
|
||||
try:
|
||||
return queryset.filter(**self.used_parameters)
|
||||
except ValidationError as e:
|
||||
except ValidationError, e:
|
||||
raise IncorrectLookupParameters(e)
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -43,13 +43,15 @@ class PermWrapperTests(TestCase):
|
|||
Test that 'something' in PermWrapper doesn't end up in endless loop.
|
||||
"""
|
||||
perms = PermWrapper(MockUser())
|
||||
with self.assertRaises(TypeError):
|
||||
def raises():
|
||||
self.EQLimiterObject() in perms
|
||||
self.assertRaises(raises, TypeError)
|
||||
|
||||
def test_permlookupdict_in(self):
|
||||
pldict = PermLookupDict(MockUser(), 'mockapp')
|
||||
with self.assertRaises(TypeError):
|
||||
def raises():
|
||||
self.EQLimiterObject() in pldict
|
||||
self.assertRaises(raises, TypeError)
|
||||
|
||||
|
||||
class AuthContextProcessorTests(TestCase):
|
||||
|
|
Loading…
Reference in New Issue