Opened 13 years ago
Closed 12 years ago
#17853 closed Bug (duplicate)
Fixture error output has wrong fixture name
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.4-beta-1 |
Severity: | Normal | Keywords: | |
Cc: | hoffmaje | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In django/core/management/commands/loaddata.py it computes the full_path
of the fixture files (~line 163) in a for loop, but all of that is wrapped up in a try/except block. If the naked Exception block (~line 231) is triggered, the full_path
is often wrong. In the cases I've seen it, it's a completely different file and often with a '.bz2' extension, which I'm not using.
Attachments (1)
Change History (6)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Cc: | added |
---|
The attachment may be a first step for refactoring loaddata; the patch simply refactors the transaction rollback (4 occurences).
comment:4 by , 13 years ago
Updated patch: readability thing: parts[-1] is worth a variable file_extension.
by , 13 years ago
Attachment: | loaddata_refactored.diff added |
---|
comment:5 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This should be fixed by the patch uploaded to #18196.
Even worse when having an exception there before full_path is even touched.