##// END OF EJS Templates
py3: make util.datapath a bytes variable...
Pulkit Goyal -
r30301:8321b083 default
parent child Browse files
Show More
@@ -49,6 +49,7 b" if (os.name == 'nt'"
49 _ugettext = None
49 _ugettext = None
50
50
51 def setdatapath(datapath):
51 def setdatapath(datapath):
52 datapath = pycompat.fsdecode(datapath)
52 localedir = os.path.join(datapath, pycompat.sysstr('locale'))
53 localedir = os.path.join(datapath, pycompat.sysstr('locale'))
53 t = gettextmod.translation('hg', localedir, _languages, fallback=True)
54 t = gettextmod.translation('hg', localedir, _languages, fallback=True)
54 global _ugettext
55 global _ugettext
@@ -938,6 +938,9 b" if mainfrozen() and getattr(sys, 'frozen"
938 else:
938 else:
939 datapath = os.path.dirname(__file__)
939 datapath = os.path.dirname(__file__)
940
940
941 if not isinstance(datapath, bytes):
942 datapath = pycompat.fsencode(datapath)
943
941 i18n.setdatapath(datapath)
944 i18n.setdatapath(datapath)
942
945
943 _hgexecutable = None
946 _hgexecutable = None
General Comments 0
You need to be logged in to leave comments. Login now