[gcompris] hangman: unsupported locale in GCompris was making this activity crash. fixes bug https://bugzilla.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] hangman: unsupported locale in GCompris was making this activity crash. fixes bug https://bugzilla.
- Date: Thu, 27 Oct 2011 00:57:09 +0000 (UTC)
commit 6166d9681e7a19328c6fb3c9617e55ecb9632617
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Thu Oct 27 02:56:06 2011 +0200
hangman: unsupported locale in GCompris was making this activity crash.
fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=662576
src/hangman-activity/hangman.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/hangman-activity/hangman.py b/src/hangman-activity/hangman.py
index ab1ad36..36d5c6f 100644
--- a/src/hangman-activity/hangman.py
+++ b/src/hangman-activity/hangman.py
@@ -96,8 +96,13 @@ class Gcompris_hangman:
self.backitem)
# Get the name of the language for the current locale
- self.language = gcompris.gcompris_gettext( gcompris.get_locale_name(gcompris.get_locale()) )
- self.wordlist = gcompris.get_wordlist("wordsgame/default-$LOCALE.xml")
+ self.wordlist = None
+ try:
+ self.language = gcompris.gcompris_gettext( gcompris.get_locale_name(gcompris.get_locale()) )
+ self.wordlist = gcompris.get_wordlist("wordsgame/default-$LOCALE.xml")
+ except:
+ pass
+
if not self.wordlist:
# Fallback to english
self.wordlist = gcompris.get_wordlist("wordsgame/default-en.xml")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]