File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ PyMODINIT_FUNC PyInit__mariadb(void)
109
109
110
110
/* Import Decimal support (CONPY-49) */
111
111
if (!(decimal_module = PyImport_ImportModule ("decimal" )) ||
112
- !(decimal_type = PyObject_GetAttrString (decimal_module , "Decimal" )))
112
+ !(decimal_type = PyObject_GetAttr (decimal_module , PyUnicode_FromString ( "Decimal" ) )))
113
113
{
114
114
goto error ;
115
115
}
@@ -173,10 +173,7 @@ PyMODINIT_FUNC PyInit__mariadb(void)
173
173
error :
174
174
if (PyErr_Occurred ())
175
175
{
176
- PyObject * type ,* value , * traceback ;
177
-
178
- PyErr_Fetch (& type , & value , & traceback );
179
- return PyErr_Format (PyExc_ImportError , "MariaDB module initialization failed: %s\n" , PyUnicode_AsUTF8 (value ));
176
+ return NULL ;
180
177
}
181
178
PyErr_SetString (PyExc_ImportError , "Mariadb module initialization failed." );
182
179
return NULL ;
You can’t perform that action at this time.
0 commit comments