Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sslutil.py @ 30672:10b17ed9b591
py3: replace sys.executable with pycompat.sysexecutable
sys.executable returns unicodes on Python 3. This patch replaces occurences of
sys.executable with pycompat.sysexecutable.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 20 Dec 2016 00:20:07 +0530 |
parents | 16b5df5792a8 |
children | 2912b06905dc |
comparison
equal
deleted
inserted
replaced
30671:3fcaf0f660ce | 30672:10b17ed9b591 |
---|---|
667 * presumably is an Apple Python that uses Apple OpenSSL which has patches | 667 * presumably is an Apple Python that uses Apple OpenSSL which has patches |
668 for using system certificate store CAs in addition to the provided | 668 for using system certificate store CAs in addition to the provided |
669 cacerts file | 669 cacerts file |
670 """ | 670 """ |
671 if (pycompat.sysplatform != 'darwin' or | 671 if (pycompat.sysplatform != 'darwin' or |
672 util.mainfrozen() or not sys.executable): | 672 util.mainfrozen() or not pycompat.sysexecutable): |
673 return False | 673 return False |
674 exe = os.path.realpath(sys.executable).lower() | 674 exe = os.path.realpath(pycompat.sysexecutable).lower() |
675 return (exe.startswith('/usr/bin/python') or | 675 return (exe.startswith('/usr/bin/python') or |
676 exe.startswith('/system/library/frameworks/python.framework/')) | 676 exe.startswith('/system/library/frameworks/python.framework/')) |
677 | 677 |
678 _systemcacertpaths = [ | 678 _systemcacertpaths = [ |
679 # RHEL, CentOS, and Fedora | 679 # RHEL, CentOS, and Fedora |