#15671: hasattr in RemoteUserMiddleware hides true errors and exceptions -------------------------------------+------------------------------------- Reporter: metzen | Owner: Type: Bug | Status: new Milestone: | Component: contrib.auth Version: SVN | Severity: Normal Resolution: | Keywords: Triage Stage: Ready for | Has patch: 1 checkin | Needs tests: 0 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 0 | -------------------------------------+-------------------------------------
Comment (by SmileyChris): How about just this? {{{ if getattr(request, 'user', None) is None: }}} (plus a comment on why we're doing this rather than just hasattr) -- Ticket URL: <http://code.djangoproject.com/ticket/15671#comment:14> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.