py3: convert sorting field to sysstr
This is used as part of an attribute name check and needs to be native str.
Differential Revision: https://phab.mercurial-scm.org/D5008
--- a/mercurial/profiling.py Fri Oct 12 17:25:02 2018 +0200
+++ b/mercurial/profiling.py Fri Oct 12 17:31:10 2018 +0200
@@ -61,7 +61,7 @@
else:
# format == 'text'
stats = lsprof.Stats(p.getstats())
- stats.sort(field)
+ stats.sort(pycompat.sysstr(field))
stats.pprint(limit=limit, file=fp, climit=climit)
@contextlib.contextmanager