changeset 40192:b8f6a99ad89b

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
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 12 Oct 2018 17:31:10 +0200
parents 4b7eb862692e
children b25fbe7e494e
files mercurial/profiling.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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