kopia lustrzana https://github.com/micropython/micropython
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.pull/6716/head
rodzic
108183fcc0
commit
069557edef
|
@ -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)
|
||||||
|
|
Ładowanie…
Reference in New Issue