-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix misleading AttributeError tracebacks on Request objects.
#2530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
AttributeError on Request` objects.AttributeError tracebacks on Request objects.
|
Thanks for working on this. I ended up tracing the problem to an issue with my auth backend, but it took some doing to get there because the original stack trace was lost. |
|
@foresmac Most welcome - needed to be done. |
|
Some unrelated stuff in this commit - mostly due to a silent upgrade of pep8 (we might consider pinning it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I'd feel better if these conditional and y or x lines were replaced with explicit Python conditional assignment statements.
return ('%s...' % x[:max(0, limit - 3)]) if limit and len(x) > limit else xThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. We're just cloning from the Django codebase here so I don't particularly mind that it's a bit rubbish in this case.
Fix misleading `AttributeError` tracebacks on `Request` objects.
Closes #2108.