summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 1fbafec..a42b0f8 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -444,6 +444,7 @@ PyImport_Cleanup(void)
/* Finally, clear and delete the modules directory */
PyDict_Clear(modules);
+ _PyGC_CollectNoFail();
interp->modules = NULL;
Py_DECREF(modules);
}