Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 31539:28f00d07e2ee
util: reference __main__ in sys.modules as a sysstr
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 19 Mar 2017 01:19:27 -0400 |
parents | 670166e0fcaa |
children | 52361c4f4dac |
line wrap: on
line diff
--- a/mercurial/util.py Sun Mar 19 01:38:10 2017 -0400 +++ b/mercurial/util.py Sun Mar 19 01:19:27 2017 -0400 @@ -969,7 +969,7 @@ """ if _hgexecutable is None: hg = encoding.environ.get('HG') - mainmod = sys.modules['__main__'] + mainmod = sys.modules[pycompat.sysstr('__main__')] if hg: _sethgexecutable(hg) elif mainfrozen():