Read about our upcoming Code of Conduct on this issue

Commit 0cecdfaf authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

py3: use native string as fallback value for __file__ for consistency

This is not a bugfix (pycommpat.fsencode(b'') is a no-op on py3), but
the b'' value was inconsistent and confusing.

Differential Revision: https://phab.mercurial-scm.org/D7412
parent c5548b0b6847
......@@ -289,7 +289,7 @@ def hgexecutable():
elif (
not pycompat.iswindows
and os.path.basename(
pycompat.fsencode(getattr(mainmod, '__file__', b''))
pycompat.fsencode(getattr(mainmod, '__file__', ''))
)
== b'hg'
):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment