# HG changeset patch # User Augie Fackler # Date 2019-11-06 19:19:05 # Node ID 5c9daf7df2b481d69f6cc1fbd1d81cf5b3053410 # Parent ab9b0a20b9e6b7f1f16f643486ff20a6d44ca2d5 statprof: correctly always pass a str as the thread name Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7259 diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -352,7 +352,7 @@ def start(mechanism=b'thread', track=b'c frame = inspect.currentframe() tid = [k for k, f in sys._current_frames().items() if f == frame][0] state.thread = threading.Thread( - target=samplerthread, args=(tid,), name=b"samplerthread" + target=samplerthread, args=(tid,), name="samplerthread" ) state.thread.start()