Patchwork D7412: py3: use native string as fallback value for __file__ for consistency

login
register
mail settings
Submitter phabricator
Date Nov. 15, 2019, 3:43 a.m.
Message ID <a21a7efe452ee0d124370c76f58a2298@localhost.localdomain>
Download mbox | patch
Permalink /patch/43246/
State Not Applicable
Headers show

Comments

phabricator - Nov. 15, 2019, 3:43 a.m.
Closed by commit rHGef43765c921d: py3: use native string as fallback value for __file__ for consistency (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7412?vs=18107&id=18135

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7412/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7412

AFFECTED FILES
  mercurial/utils/procutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py
+++ b/mercurial/utils/procutil.py
@@ -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'
         ):