From 4d2cc3ed46d2453bad92243128e237e7febca714 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Mon, 29 Nov 2021 10:07:24 +0000 Subject: bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29826) (cherry picked from commit 4dfae6f38e1720ddafcdd68043e476ecb41cb4d5) --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 5704bcc758..0f1794acec 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -972,7 +972,7 @@ print_exception(PyObject *f, PyObject *value) { Py_XDECREF(modulename); PyErr_Clear(); - err = PyFile_WriteString("", f); + err = PyFile_WriteString(".", f); } else { if (!_PyUnicode_EqualToASCIIId(modulename, &PyId_builtins)) -- cgit v1.2.1