diff options
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 3f0baf98890..acee794864f 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1884,13 +1884,10 @@ sys__getframe_impl(PyObject *module, int depth) if (frame != NULL) { while (depth > 0) { - frame = frame->previous; + frame = _PyFrame_GetFirstComplete(frame->previous); if (frame == NULL) { break; } - if (_PyFrame_IsIncomplete(frame)) { - continue; - } --depth; } } |