# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-02-07 17:17:24 # Node ID 441705506d2458e960437c8613eed7fb9e744f38 # Parent b1b36c6499c2c003e15e0a52ce8b489166fe8fdd py3: convert os.__file__ to bytes os.__file__ returns unicode path on Python 3. We need to have bytespath. This patch uses pycompat.fsencode() to encode unicode path to bytes path. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1903,7 +1903,7 @@ def debuginstall(ui, **opts): fm.write('pythonver', _("checking Python version (%s)\n"), ("%d.%d.%d" % sys.version_info[:3])) fm.write('pythonlib', _("checking Python lib (%s)...\n"), - os.path.dirname(os.__file__)) + os.path.dirname(pycompat.fsencode(os.__file__))) security = set(sslutil.supportedprotocols) if sslutil.hassni: