Mercurial > public > mercurial-scm > hg
comparison mercurial/utils/procutil.py @ 43656:47d983f0af65
py3: drop an unnecessary fsencode() before comparing with constant
Differential Revision: https://phab.mercurial-scm.org/D7413
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 14 Nov 2019 14:07:36 -0800 |
parents | ef43765c921d |
children | 38387f9e4d22 |
comparison
equal
deleted
inserted
replaced
43655:ef43765c921d | 43656:47d983f0af65 |
---|---|
286 _sethgexecutable(encoding.environ[b'EXECUTABLEPATH']) | 286 _sethgexecutable(encoding.environ[b'EXECUTABLEPATH']) |
287 else: | 287 else: |
288 _sethgexecutable(pycompat.sysexecutable) | 288 _sethgexecutable(pycompat.sysexecutable) |
289 elif ( | 289 elif ( |
290 not pycompat.iswindows | 290 not pycompat.iswindows |
291 and os.path.basename( | 291 and os.path.basename(getattr(mainmod, '__file__', '')) == 'hg' |
292 pycompat.fsencode(getattr(mainmod, '__file__', '')) | |
293 ) | |
294 == b'hg' | |
295 ): | 292 ): |
296 _sethgexecutable(pycompat.fsencode(mainmod.__file__)) | 293 _sethgexecutable(pycompat.fsencode(mainmod.__file__)) |
297 else: | 294 else: |
298 _sethgexecutable( | 295 _sethgexecutable( |
299 findexe(b'hg') or os.path.basename(pycompat.sysargv[0]) | 296 findexe(b'hg') or os.path.basename(pycompat.sysargv[0]) |