Opened 14 years ago
Closed 14 years ago
#17300 closed Bug (fixed)
Creating an already existing cache table shouldn't crash
| Reported by: | Claude Paroz | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | 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
When you run ./manage.py createcachetable two times with the same table argument, the command crashes the second time. I think we should display a proper error message instead.
Attachments (3)
Change History (8)
by , 14 years ago
| Attachment: | 17300-1.diff added |
|---|
comment:1 by , 14 years ago
| Has patch: | set |
|---|---|
| Patch needs improvement: | set |
The attached patch is currently failing with MySQL as the error raised is MySQLdb.OperationalError instead of db.utils.DatabaseError.
comment:2 by , 14 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
by , 14 years ago
| Attachment: | 17300-2.diff added |
|---|
Same patch with mysql returning utils.DatabaseError
comment:3 by , 14 years ago
| Patch needs improvement: | unset |
|---|
Note:
See TracTickets
for help on using tickets.
Catch database error and display error message