comparison mercurial/commands.py @ 30892:441705506d24

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.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 07 Feb 2017 22:47:24 +0530
parents 1be65deb3d54
children a8786013f056
comparison
equal deleted inserted replaced
30891:b1b36c6499c2 30892:441705506d24
1901 fm.write('pythonexe', _("checking Python executable (%s)\n"), 1901 fm.write('pythonexe', _("checking Python executable (%s)\n"),
1902 pycompat.sysexecutable) 1902 pycompat.sysexecutable)
1903 fm.write('pythonver', _("checking Python version (%s)\n"), 1903 fm.write('pythonver', _("checking Python version (%s)\n"),
1904 ("%d.%d.%d" % sys.version_info[:3])) 1904 ("%d.%d.%d" % sys.version_info[:3]))
1905 fm.write('pythonlib', _("checking Python lib (%s)...\n"), 1905 fm.write('pythonlib', _("checking Python lib (%s)...\n"),
1906 os.path.dirname(os.__file__)) 1906 os.path.dirname(pycompat.fsencode(os.__file__)))
1907 1907
1908 security = set(sslutil.supportedprotocols) 1908 security = set(sslutil.supportedprotocols)
1909 if sslutil.hassni: 1909 if sslutil.hassni:
1910 security.add('sni') 1910 security.add('sni')
1911 1911