changeset 48481:c1fe758c1530

statprof: convert a few exception byte strings to str That way these display without the b'' prefix. Differential Revision: https://phab.mercurial-scm.org/D11920
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 13 Dec 2021 17:59:36 -0500
parents cfb4f1dee978
children d2fff292c265
files mercurial/statprof.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/statprof.py	Mon Dec 13 16:42:36 2021 -0500
+++ b/mercurial/statprof.py	Mon Dec 13 17:59:36 2021 -0500
@@ -516,7 +516,7 @@
     elif format == DisplayFormats.Chrome:
         write_to_chrome(data, fp, **kwargs)
     else:
-        raise Exception(b"Invalid display format")
+        raise Exception("Invalid display format")
 
     if format not in (DisplayFormats.Json, DisplayFormats.Chrome):
         fp.write(b'---\n')
@@ -625,7 +625,7 @@
 
 def display_about_method(data, fp, function=None, **kwargs):
     if function is None:
-        raise Exception(b"Invalid function")
+        raise Exception("Invalid function")
 
     filename = None
     if b':' in function:
@@ -1080,7 +1080,7 @@
             printusage()
             return 0
         else:
-            assert False, b"unhandled option %s" % o
+            assert False, "unhandled option %s" % o
 
     if not path:
         print('must specify --file to load')