Patchwork D7414: py3: use native string for 'macosx_app'

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

Comments

phabricator - Nov. 15, 2019, 3:44 a.m.
Closed by commit rHG38387f9e4d22: py3: use native string for &#039;macosx_app&#039; (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/D7414?vs=18109&id=18137

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

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

AFFECTED FILES
  mercurial/util.py
  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
@@ -281,7 +281,7 @@ 
         if hg:
             _sethgexecutable(hg)
         elif mainfrozen():
-            if getattr(sys, 'frozen', None) == b'macosx_app':
+            if getattr(sys, 'frozen', None) == 'macosx_app':
                 # Env variable set by py2app
                 _sethgexecutable(encoding.environ[b'EXECUTABLEPATH'])
             else:
@@ -457,7 +457,7 @@ 
     get either the python call or current executable.
     """
     if mainfrozen():
-        if getattr(sys, 'frozen', None) == b'macosx_app':
+        if getattr(sys, 'frozen', None) == 'macosx_app':
             # Env variable set by py2app
             return [encoding.environ[b'EXECUTABLEPATH']]
         else:
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1823,7 +1823,7 @@ 
 
 
 # the location of data files matching the source code
-if procutil.mainfrozen() and getattr(sys, 'frozen', None) != b'macosx_app':
+if procutil.mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
     # executable version (py2exe) doesn't support __file__
     datapath = os.path.dirname(pycompat.sysexecutable)
 else: