# HG changeset patch # User Martin von Zweigbergk # Date 2019-11-14 22:07:36 # Node ID 47d983f0af65d1f8fa281f7ed8fe23b0d5c40546 # Parent ef43765c921d4980b1ec698fc9c15921212b5528 py3: drop an unnecessary fsencode() before comparing with constant Differential Revision: https://phab.mercurial-scm.org/D7413 diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py +++ b/mercurial/utils/procutil.py @@ -288,10 +288,7 @@ def hgexecutable(): _sethgexecutable(pycompat.sysexecutable) elif ( not pycompat.iswindows - and os.path.basename( - pycompat.fsencode(getattr(mainmod, '__file__', '')) - ) - == b'hg' + and os.path.basename(getattr(mainmod, '__file__', '')) == 'hg' ): _sethgexecutable(pycompat.fsencode(mainmod.__file__)) else: