Opened 8 years ago
Closed 8 years ago
#28116 closed Bug (fixed)
Filtering PostgreSQL exception based on message is too brittle
Reported by: | Claude Paroz | Owned by: | Mariusz Felisiak |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Mariusz Felisiak | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In commit 64264c9a19b7dae6cd1d5e112177cdbcafafc93c, the behavior of _execute_create_test_db
depends on the databae error message ''database %s already exists'
.
On my system for example, the error message is localized so I'm finally getting a message Got an error creating the test database: la base de données « test_testgis1 » existe déjà
even when I provide --keepdb
.
Change History (7)
comment:1 by , 8 years ago
Cc: | added |
---|
comment:2 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 8 years ago
comment:6 by , 8 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
What about just trying to check if the database exists when
keepdb
is True?