decode the catalog lookup path if needed

This commit is contained in:
Robin Dunn
2021-01-20 13:34:53 -08:00
parent c3d4881bfd
commit 66f62480f3

View File

@@ -61,6 +61,8 @@ def run():
import os
_localedir = os.path.join(os.path.dirname(__file__), "locale")
if os.path.exists(_localedir):
if isinstance(_localedir, (bytes, bytearray)):
_localedir = _localedir.decode(_sys.getfilesystemencoding())
Locale.AddCatalogLookupPathPrefix(_localedir)
del os
#----------------------------------------------------------------------------