Read about our upcoming Code of Conduct on this issue

Commit a52e4d36 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

py3: use native string for 'macosx_app'

I couldn't find any definitive information on this, but all examples
(except for ours) seem to use a native string.

Differential Revision: https://phab.mercurial-scm.org/D7414
parent 47d983f0af65
......@@ -1823,7 +1823,7 @@ def pathto(root, n1, n2):
# 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:
......
......@@ -281,7 +281,7 @@ def hgexecutable():
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 @@ def hgcmd():
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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment