Mercurial > hg-stable
diff mercurial/util.py @ 30039:ff7697b436ab
py3: use unicode in is_frozen()
imp.is_frozen() doesnot accepts bytes on Python 3.
It does accept both bytes and strings on Python 2.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 02 Oct 2016 05:29:17 +0530 |
parents | 42ead5b3aa7b |
children | dbcef8918bbd |
line wrap: on
line diff
--- a/mercurial/util.py Sun Oct 02 03:38:14 2016 +0530 +++ b/mercurial/util.py Sun Oct 02 05:29:17 2016 +0530 @@ -927,7 +927,7 @@ """ return (safehasattr(sys, "frozen") or # new py2exe safehasattr(sys, "importers") or # old py2exe - imp.is_frozen("__main__")) # tools/freeze + imp.is_frozen(u"__main__")) # tools/freeze # the location of data files matching the source code if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':