From 0d6760b1944fae7326ceb5aa181bf78109d20fcf Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 28 Jun 2007 22:40:37 +0200 Subject: [PATCH] Do not fail is lang is not set --- sugar/activity/bundle.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py index e4f09d3f..feded650 100644 --- a/sugar/activity/bundle.py +++ b/sugar/activity/bundle.py @@ -155,7 +155,10 @@ class Bundle: def _get_linfo_file(self): linfo_file = None + lang = locale.getdefaultlocale()[0] + if not lang: + return None if os.path.isdir(self._path): linfo_path = os.path.join(self.get_locale_path(), lang, 'activity.linfo')