mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 21:00:33 +03:00
Don't abort if sqlstate_errors already initialized
This commit is contained in:
parent
0f457a01d9
commit
22575528be
|
@ -770,9 +770,8 @@ sqlstate_errors_init(PyObject *module)
|
||||||
Dprintf("psycopgmodule: initializing sqlstate exceptions");
|
Dprintf("psycopgmodule: initializing sqlstate exceptions");
|
||||||
|
|
||||||
if (sqlstate_errors) {
|
if (sqlstate_errors) {
|
||||||
PyErr_SetString(PyExc_SystemError,
|
Dprintf("sqlstate_errors_init(): already called");
|
||||||
"sqlstate_errors_init(): already called");
|
return 0;
|
||||||
goto exit;
|
|
||||||
}
|
}
|
||||||
if (!(errmodule = PyImport_ImportModule("psycopg2.errors"))) {
|
if (!(errmodule = PyImport_ImportModule("psycopg2.errors"))) {
|
||||||
/* don't inject the exceptions into the errors module */
|
/* don't inject the exceptions into the errors module */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user