Do not fail is lang is not set

This commit is contained in:
Marco Pesenti Gritti 2007-06-28 22:40:37 +02:00
parent 03ef9c034e
commit 0d6760b194

View File

@ -155,7 +155,10 @@ class Bundle:
def _get_linfo_file(self): def _get_linfo_file(self):
linfo_file = None linfo_file = None
lang = locale.getdefaultlocale()[0] lang = locale.getdefaultlocale()[0]
if not lang:
return None
if os.path.isdir(self._path): if os.path.isdir(self._path):
linfo_path = os.path.join(self.get_locale_path(), lang, 'activity.linfo') linfo_path = os.path.join(self.get_locale_path(), lang, 'activity.linfo')