Skip to content

Commit 67cf8fd

Browse files
committed
Simplify the codes
1 parent b6735f6 commit 67cf8fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Modules/_datetimemodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7349,11 +7349,10 @@ init_static_types(PyInterpreterState *interp, int reloading)
73497349
PyTypeObject *type = capi_types[i];
73507350
PyMutex_Lock(&mutex);
73517351
int ret = _PyStaticType_InitForExtension(interp, type);
7352+
PyMutex_Unlock(&mutex);
73527353
if (ret < 0) {
7353-
PyMutex_Unlock(&mutex);
73547354
return -1;
73557355
}
7356-
PyMutex_Unlock(&mutex);
73577356
}
73587357

73597358
return 0;

0 commit comments

Comments
 (0)