summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2021-11-29 10:07:24 (GMT)
committerGitHub <noreply@github.com>2021-11-29 10:07:24 (GMT)
commit4d2cc3ed46d2453bad92243128e237e7febca714 (patch)
treea95052cc836753e3364428617460471c7eba99c1 /Python/pythonrun.c
parent305236e03a274850be8ed399ea3390ee71519ef4 (diff)
downloadcpython-4d2cc3ed46d2453bad92243128e237e7febca714.zip
cpython-4d2cc3ed46d2453bad92243128e237e7febca714.tar.gz
cpython-4d2cc3ed46d2453bad92243128e237e7febca714.tar.bz2
bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29826)
(cherry picked from commit 4dfae6f38e1720ddafcdd68043e476ecb41cb4d5)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 5704bcc..0f1794a 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("<unknown>", f);
+ err = PyFile_WriteString("<unknown>.", f);
}
else {
if (!_PyUnicode_EqualToASCIIId(modulename, &PyId_builtins))