Commit 069557ed authored by stijn's avatar stijn Committed by Damien George

tests/misc/sys_settrace_features.py: Fix running with non-dflt encoding.

Notably git-cmd which comes with git installations on Windows alters the
encoding resulting in CPython tracing encodings/cp1252.py calls.
parent 108183fc
...@@ -60,8 +60,9 @@ def trace_tick_handler_bob(frame, event, arg): ...@@ -60,8 +60,9 @@ def trace_tick_handler_bob(frame, event, arg):
def trace_tick_handler(frame, event, arg): def trace_tick_handler(frame, event, arg):
# Ignore CPython specific helpers. # Ignore CPython specific helpers.
to_ignore = ["importlib", "zipimport", "encodings"]
frame_name = frame.f_globals["__name__"] frame_name = frame.f_globals["__name__"]
if frame_name.find("importlib") != -1 or frame_name.find("zipimport") != -1: if any(name in frame_name for name in to_ignore):
return return
print("### trace_handler::main event:", event) print("### trace_handler::main event:", event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment