changeset 43699:ef43765c921d

py3: use native string as fallback value for __file__ for consistency This is not a bugfix (pycommpat.fsencode(b'') is a no-op on py3), but the b'' value was inconsistent and confusing. Differential Revision: https://phab.mercurial-scm.org/D7412
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 14 Nov 2019 14:03:02 -0800
parents c5548b0b6847
children 47d983f0af65
files mercurial/utils/procutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/procutil.py	Thu Nov 14 13:38:17 2019 -0500
+++ b/mercurial/utils/procutil.py	Thu Nov 14 14:03:02 2019 -0800
@@ -289,7 +289,7 @@
         elif (
             not pycompat.iswindows
             and os.path.basename(
-                pycompat.fsencode(getattr(mainmod, '__file__', b''))
+                pycompat.fsencode(getattr(mainmod, '__file__', ''))
             )
             == b'hg'
         ):