Ticket #18171: type_error_raised.diff

File type_error_raised.diff, 670 bytes (added by Renato Oliveira, 12 years ago)
  • django/contrib/auth/__init__.py

    diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py
    index 0b3ccf7..8614b2a 100644
    a b def authenticate(**credentials):  
    3737    for backend in get_backends():
    3838        try:
    3939            user = backend.authenticate(**credentials)
    40         except TypeError:
    41             # This backend doesn't accept these credentials as arguments. Try the next one.
    42             continue
     40        except TypeError as e:
     41            raise TypeError(e.message)
    4342        if user is None:
    4443            continue
    4544        # Annotate the user object with the path of the backend.
Back to Top