From 93f969720a534b752fc32f26157a68b764d38a28 Mon Sep 17 00:00:00 2001 From: rchiodo Date: Tue, 4 Oct 2022 10:16:45 -0700 Subject: [PATCH] Fix problem when paths from eval are none (can happen in emscripten case) --- src/debugpy/common/log.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/debugpy/common/log.py b/src/debugpy/common/log.py index 2859dc20..62815439 100644 --- a/src/debugpy/common/log.py +++ b/src/debugpy/common/log.py @@ -312,9 +312,10 @@ def describe_environment(header): for p in sorted(paths): report("{0}{1}", prefix, p) - rp = os.path.realpath(p) - if p != rp: - report("({0})", rp) + if p is not None: + rp = os.path.realpath(p) + if p != rp: + report("({0})", rp) report("\n") prefix = " " * len(prefix)