mercurial/pycompat.py
changeset 30668 3fcaf0f660ce
parent 30663 bb0d5aad761a
child 30678 caf7e1c5efe4
--- a/mercurial/pycompat.py	Thu Dec 22 01:54:17 2016 +0530
+++ b/mercurial/pycompat.py	Tue Dec 20 00:02:24 2016 +0530
@@ -52,6 +52,9 @@
     # returns bytes.
     getcwd = os.getcwdb
     sysplatform = sys.platform.encode('ascii')
+    sysexecutable = sys.executable
+    if sysexecutable:
+        sysexecutable = os.fsencode(sysexecutable)
 
     # TODO: .buffer might not exist if std streams were replaced; we'll need
     # a silly wrapper to make a bytes stream backed by a unicode one.
@@ -158,6 +161,7 @@
     sysplatform = sys.platform
     getcwd = os.getcwd
     osgetenv = os.getenv
+    sysexecutable = sys.executable
 
 stringio = io.StringIO
 empty = _queue.Empty