#15778: Command createsuperuser fails under some system user names -------------------------------------+------------------------------------- Reporter: Hynek | Owner: Alex Gaynor Cernoch <hynek@…> | Status: new Type: Bug | Component: contrib.auth Milestone: 1.3 | Severity: Normal Version: 1.3 | Keywords: Resolution: | Has patch: 1 Triage Stage: Accepted | Needs tests: 1 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 1 | -------------------------------------+-------------------------------------
Comment (by anonymous): The patch is bad. What {{{.encode('ascii', 'ignore')}}} does is that it ignores the {{{UnicodeError}}}. So what is the point of catching the {{{UnicodeDecodeError}}} (a subclass of {{{UnicodeError}}}) that would never get raised? Then the code block {{{default_username = ''}}} will never get executed. I suggest removing the {{{'ignore'}}} positional argument; if it is removed, that defaults to {{{'strict'}}}, which catches the {{{UnicodeError}}} -- which is what we want. -- Ticket URL: <http://code.djangoproject.com/ticket/15778#comment:15> 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.