Mercurial > public > mercurial-scm > hg
comparison mercurial/utils/procutil.py @ 41832:b275dbb60089
procutil: use a raw string for module name
Otherwise Python 2 will coerce unicode to str.
Differential Revision: https://phab.mercurial-scm.org/D6047
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 02 Mar 2019 12:51:55 -0800 |
parents | b0e3f2d7c143 |
children | ca1014ad3de4 |
comparison
equal
deleted
inserted
replaced
41831:ae189674bdad | 41832:b275dbb60089 |
---|---|
219 The code supports py2exe (most common, Windows only) and tools/freeze | 219 The code supports py2exe (most common, Windows only) and tools/freeze |
220 (portable, not much used). | 220 (portable, not much used). |
221 """ | 221 """ |
222 return (pycompat.safehasattr(sys, "frozen") or # new py2exe | 222 return (pycompat.safehasattr(sys, "frozen") or # new py2exe |
223 pycompat.safehasattr(sys, "importers") or # old py2exe | 223 pycompat.safehasattr(sys, "importers") or # old py2exe |
224 imp.is_frozen(u"__main__")) # tools/freeze | 224 imp.is_frozen(r"__main__")) # tools/freeze |
225 | 225 |
226 _hgexecutable = None | 226 _hgexecutable = None |
227 | 227 |
228 def hgexecutable(): | 228 def hgexecutable(): |
229 """return location of the 'hg' executable. | 229 """return location of the 'hg' executable. |