From 3ff9bdcc8818faae88aa8fcc3073fd1cb876ef32 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 8 Dec 2020 16:08:30 +0000 Subject: [PATCH] Fix Python 3.8 syntax use in backport to 4.1.x/Python 3.7 --- EDMCLogging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EDMCLogging.py b/EDMCLogging.py index 846dba84..308e85fc 100644 --- a/EDMCLogging.py +++ b/EDMCLogging.py @@ -291,7 +291,8 @@ class EDMCContextFilter(logging.Filter): if frame_class: # See https://en.wikipedia.org/wiki/Name_mangling#Python for how name mangling works. - if (name := frame_info.function).startswith("__") and not name.endswith("__"): + name = frame_info.function + if name.startswith("__") and not name.endswith("__"): name = f'_{frame_class.__class__.__name__}{frame_info.function}' # Find __qualname__ of the caller