statprof: don't pass str `sys.argv` to a function expecting bytes
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 14 Dec 2022 22:27:22 -0500
changeset 49806 9eb69fa5a783
parent 49805 a06a503e3cf8
child 49807 c5a06cc37401
statprof: don't pass str `sys.argv` to a function expecting bytes Found by typing the global functions in mercurial.pycompat.
mercurial/statprof.py
--- a/mercurial/statprof.py	Wed Dec 14 22:24:54 2022 -0500
+++ b/mercurial/statprof.py	Wed Dec 14 22:27:22 2022 -0500
@@ -1049,7 +1049,7 @@
     # process options
     try:
         opts, args = pycompat.getoptb(
-            sys.argv[optstart:],
+            pycompat.sysargv[optstart:],
             b"hl:f:o:p:",
             [b"help", b"limit=", b"file=", b"output-file=", b"script-path="],
         )