Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b497c10 commit dbce261Copy full SHA for dbce261
1 file changed
Modules/_csv.c
@@ -127,9 +127,12 @@ get_dialect_from_registry(PyObject * name_obj)
127
PyObject *dialect_obj;
128
129
dialect_obj = PyDict_GetItem(dialects, name_obj);
130
- if (dialect_obj == NULL)
131
- return PyErr_Format(error_obj, "unknown dialect");
132
- Py_INCREF(dialect_obj);
+ if (dialect_obj == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_Format(error_obj, "unknown dialect");
133
+ }
134
+ else
135
+ Py_INCREF(dialect_obj);
136
return dialect_obj;
137
}
138
0 commit comments