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 3d29380 commit 26b8f51Copy full SHA for 26b8f51
Modules/_datetimemodule.c
@@ -164,7 +164,7 @@ _get_current_state(PyObject **p_mod)
164
{
165
PyInterpreterState *interp = PyInterpreterState_Get();
166
datetime_state *st = interp->datetime_module_state;
167
- if (st != NULL) {
+ if (st != NULL && st->isocalendar_date_type != NULL) {
168
PyObject *mod = PyType_GetModule(st->isocalendar_date_type);
169
assert(mod != NULL);
170
*p_mod = Py_NewRef(mod);
0 commit comments