Skip to content
Snippets Groups Projects
Commit a90039b0 authored by Matt Harbison's avatar Matt Harbison
Browse files

resourceutil: ensure `_rootpath` is defined under py2exe

Can't even run `hg version` without this.

Differential Revision: https://phab.mercurial-scm.org/D7980
parent ae596fac
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@
if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
# executable version (py2exe) doesn't support __file__
datapath = os.path.dirname(pycompat.sysexecutable)
_rootpath = os.path.dirname(datapath)
else:
datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
_rootpath = os.path.dirname(datapath)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment