Patchwork D7259: statprof: correctly always pass a str as the thread name

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 10:56 p.m.
Message ID <differential-rev-PHID-DREV-o4aeouvjcwkn3a6xrfzm-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42812/
State Superseded
Headers show

Comments

phabricator - Nov. 6, 2019, 10:56 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Caught by pytype.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7259

AFFECTED FILES
  mercurial/statprof.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/statprof.py b/mercurial/statprof.py
--- a/mercurial/statprof.py
+++ b/mercurial/statprof.py
@@ -352,7 +352,7 @@ 
             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()