From c79a4c453b84753137373adf0e09c80e2a041fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Wed, 25 Sep 2024 10:56:00 +0200 Subject: [PATCH] More terminal debugging --- Lib/_pyrepl/simple_interact.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Lib/_pyrepl/simple_interact.py b/Lib/_pyrepl/simple_interact.py index f252238b38ee22..6d1b9fbd5f5a38 100644 --- a/Lib/_pyrepl/simple_interact.py +++ b/Lib/_pyrepl/simple_interact.py @@ -51,10 +51,9 @@ def check() -> str: _get_reader() except _error as e: import os # temporary debugging measure to understand the Address sanitizer environment failure - term = "" - if term := os.environ.get("TERM"): - term = f"TERM={term}" - return (str(e) or repr(e) or "unknown error") + f"; {term}" if term else "" + if term := os.environ.get("TERM", ""): + term = f"; TERM={term}" + return str(str(e) or repr(e) or "unknown error") + term return ""