changeset 48939:37537a4d2695

statprof: remove superfluous sys.version_info check Always true since we require Python 3 now. Differential Revision: https://phab.mercurial-scm.org/D12345
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 12:36:57 -0700
parents f98da1349212
children 2974cdda819b
files mercurial/statprof.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/statprof.py	Mon Feb 21 12:36:04 2022 -0700
+++ b/mercurial/statprof.py	Mon Feb 21 12:36:57 2022 -0700
@@ -607,9 +607,7 @@
             # only show line numbers for significant locations (>1% time spent)
             if stat.selfpercent() > 1:
                 source = stat.site.getsource(25)
-                if sys.version_info.major >= 3 and not isinstance(
-                    source, bytes
-                ):
+                if not isinstance(source, bytes):
                     source = pycompat.bytestr(source)
 
                 stattuple = (