wrapfunction: use sysstr instead of bytes as argument in "perf"
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 10 Jul 2023 19:31:26 +0200
changeset 50832 193a6e9a56f3
parent 50831 c3d7a0828b7b
child 50833 7a50e1720f6d
wrapfunction: use sysstr instead of bytes as argument in "perf" This is as valid and simpler, it will help us to eventually get ride of `safehasattr`.
contrib/perf.py
--- a/contrib/perf.py	Fri Feb 03 04:30:44 2023 +0100
+++ b/contrib/perf.py	Mon Jul 10 19:31:26 2023 +0200
@@ -4421,7 +4421,8 @@
                 )
             return orig(repo, cmd, file_, opts)
 
-        extensions.wrapfunction(cmdutil, b'openrevlog', openrevlog)
+        name = _sysstr(b'openrevlog')
+        extensions.wrapfunction(cmdutil, name, openrevlog)
 
 
 @command(