comparison mercurial/chgserver.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 a3f335d1247c
children dd897eb1699e
comparison
equal deleted inserted replaced
30671:3fcaf0f660ce 30672:10b17ed9b591
45 import inspect 45 import inspect
46 import os 46 import os
47 import re 47 import re
48 import signal 48 import signal
49 import struct 49 import struct
50 import sys
51 import time 50 import time
52 51
53 from .i18n import _ 52 from .i18n import _
54 53
55 from . import ( 54 from . import (
57 commandserver, 56 commandserver,
58 encoding, 57 encoding,
59 error, 58 error,
60 extensions, 59 extensions,
61 osutil, 60 osutil,
61 pycompat,
62 util, 62 util,
63 ) 63 )
64 64
65 _log = commandserver.log 65 _log = commandserver.log
66 66
120 try: 120 try:
121 from . import __version__ 121 from . import __version__
122 modules.append(__version__) 122 modules.append(__version__)
123 except ImportError: 123 except ImportError:
124 pass 124 pass
125 files = [sys.executable] 125 files = [pycompat.sysexecutable]
126 for m in modules: 126 for m in modules:
127 try: 127 try:
128 files.append(inspect.getabsfile(m)) 128 files.append(inspect.getabsfile(m))
129 except TypeError: 129 except TypeError:
130 pass 130 pass