[gnome-clocks] Don't bail on invalid user locale setting



commit f173db7c1d1ff90598e29cf8954be6206edca6b0
Author: Yanko Kaneti <yaneti declera com>
Date:   Tue Oct 9 11:30:07 2012 +0300

    Don't bail on invalid user locale setting
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685791

 gnome-clocks |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-clocks b/gnome-clocks
index 287db9e..e77c0a5 100755
--- a/gnome-clocks
+++ b/gnome-clocks
@@ -47,7 +47,10 @@ import gettext
 from gnomeclocks.utils import Dirs
 
 locale_domain = "gnome-clocks"
-locale.setlocale(locale.LC_ALL, '')
+try:
+    locale.setlocale(locale.LC_ALL, '')
+except:
+    pass
 gettext.bindtextdomain(locale_domain, Dirs.get_locale_dir())
 gettext.textdomain(locale_domain)
 gettext.install(locale_domain, Dirs.get_locale_dir())



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]