Skip to content
Snippets Groups Projects
Commit acf80f9e authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

py3: drop incorrect fsencode(findexe(...)) in procutil

I recently added the bad call, thinking that findexe() was a standard
library function returning a string result, but it's actually our own
function returning bytes. Thanks to Yuya for noticing.

Differential Revision: https://phab.mercurial-scm.org/D6826
parent 3bed541a
No related branches found
No related tags found
No related merge requests found
......@@ -245,11 +245,8 @@
pycompat.fsencode(getattr(mainmod, '__file__', ''))) == 'hg'):
_sethgexecutable(pycompat.fsencode(mainmod.__file__))
else:
exe = findexe('hg')
if exe:
_sethgexecutable(pycompat.fsencode(exe))
else:
_sethgexecutable(os.path.basename(pycompat.sysargv[0]))
_sethgexecutable(findexe('hg') or
os.path.basename(pycompat.sysargv[0]))
return _hgexecutable
def _sethgexecutable(path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment