diff mercurial/sslutil.py @ 30669: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
line wrap: on
line diff
--- a/mercurial/sslutil.py	Tue Dec 20 00:02:24 2016 +0530
+++ b/mercurial/sslutil.py	Tue Dec 20 00:20:07 2016 +0530
@@ -669,9 +669,9 @@
       cacerts file
     """
     if (pycompat.sysplatform != 'darwin' or
-                        util.mainfrozen() or not sys.executable):
+                        util.mainfrozen() or not pycompat.sysexecutable):
         return False
-    exe = os.path.realpath(sys.executable).lower()
+    exe = os.path.realpath(pycompat.sysexecutable).lower()
     return (exe.startswith('/usr/bin/python') or
             exe.startswith('/system/library/frameworks/python.framework/'))