Patchwork D6047: procutil: use a raw string for module name

login
register
mail settings
Submitter phabricator
Date March 2, 2019, 9:26 p.m.
Message ID <differential-rev-PHID-DREV-k25o763h4kup4foizaw6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/38997/
State Superseded
Headers show

Comments

phabricator - March 2, 2019, 9:26 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Otherwise Python 2 will coerce unicode to str.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/utils/procutil.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
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
@@ -221,7 +221,7 @@ 
     """
     return (pycompat.safehasattr(sys, "frozen") or # new py2exe
             pycompat.safehasattr(sys, "importers") or # old py2exe
-            imp.is_frozen(u"__main__")) # tools/freeze
+            imp.is_frozen(r"__main__")) # tools/freeze
 
 _hgexecutable = None