From: Felix Domke Date: Thu, 17 Nov 2005 21:44:53 +0000 (+0000) Subject: translation: don't fail when no language exists X-Git-Tag: 2.6.0~5098 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/63db9d7e8e9bcfbba428d9b5a951d2902d9579c6 translation: don't fail when no language exists --- diff --git a/lib/python/Components/Language.py b/lib/python/Components/Language.py index 8d966b68..d6cdf17f 100644 --- a/lib/python/Components/Language.py +++ b/lib/python/Components/Language.py @@ -16,8 +16,11 @@ class Language: print "Language " + str(name) + " not found" def activateLanguage(self, index): - print "Activating language " + str(self.lang[index][0]) - self.lang[index][1].install() + try: + print "Activating language " + str(self.lang[index][0]) + self.lang[index][1].install() + except: + print "Selected language does not exist!" def getLanguageList(self): list = [] @@ -25,4 +28,4 @@ class Language: list.append(x[0]) return list -language = Language() \ No newline at end of file +language = Language()