#20599 closed Cleanup/optimization (fixed)
BasePasswordHasher _load_library swallows ImportErrors
| Reported by: | Jaap Roes | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.auth | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The _load_library method on BasePasswordHasher turns ImportErrors into ValueErrors, this masks ImportErrors in the algorithm library. I'm proposing a slightly clearer worded error message.
Before:
"Couldn't load foo password algorithm library"
After:
"Couldn't load 'FooHasher' algorithm library: No module named bar"
I'll link to a GitHub pull request after I know the ticket number.
Change History (4)
comment:1 by , 12 years ago
| Has patch: | set |
|---|
comment:2 by , 12 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Pull request can be found here https://github.com/django/django/pull/1274