Mercurial > hg
comparison mercurial/statprof.py @ 49806:9eb69fa5a783
statprof: don't pass str `sys.argv` to a function expecting bytes
Found by typing the global functions in mercurial.pycompat.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 14 Dec 2022 22:27:22 -0500 |
parents | aab3d4c05720 |
children | 972f3e5c94b8 |
comparison
equal
deleted
inserted
replaced
49805:a06a503e3cf8 | 49806:9eb69fa5a783 |
---|---|
1047 return 0 | 1047 return 0 |
1048 | 1048 |
1049 # process options | 1049 # process options |
1050 try: | 1050 try: |
1051 opts, args = pycompat.getoptb( | 1051 opts, args = pycompat.getoptb( |
1052 sys.argv[optstart:], | 1052 pycompat.sysargv[optstart:], |
1053 b"hl:f:o:p:", | 1053 b"hl:f:o:p:", |
1054 [b"help", b"limit=", b"file=", b"output-file=", b"script-path="], | 1054 [b"help", b"limit=", b"file=", b"output-file=", b"script-path="], |
1055 ) | 1055 ) |
1056 except getopt.error as msg: | 1056 except getopt.error as msg: |
1057 print(msg) | 1057 print(msg) |