From 4dfae6f38e1720ddafcdd68043e476ecb41cb4d5 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sat, 27 Nov 2021 22:00:10 +0000 Subject: bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 2c0950ee17..2f68b21460 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1022,7 +1022,7 @@ print_exception(struct exception_print_context *ctx, 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