Skip to content

Commit a23d40e

Browse files
committed
Add invariant check
1 parent c0323cc commit a23d40e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/import.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4502,6 +4502,7 @@ _PyImport_LazyImportModuleLevelObject(PyThreadState *tstate,
45024502
modname = Py_NewRef(Py_None);
45034503
}
45044504
if (fromlist == NULL) {
4505+
assert(!PyErr_Occurred());
45054506
fromlist = Py_NewRef(Py_None);
45064507
}
45074508
PyObject *args[] = {modname, name, fromlist};

0 commit comments

Comments
 (0)