diff options
author | Benjamin Schwartz <bens@alum.mit.edu> | 2009-12-23 04:43:11 (GMT) |
---|---|---|
committer | Benjamin Schwartz <bens@alum.mit.edu> | 2009-12-23 04:43:11 (GMT) |
commit | ff0cfdbf6d8d75702a416fb2f7b12bb9dfe22620 (patch) | |
tree | d5359801bd0a5afc4f5589f86bf32cc2b3c33ea1 | |
parent | 8c1755b2cf7501779ff4a3026a5f2f2c5382ff10 (diff) |
Catch setlocale error to fix DLO#9888
-rw-r--r-- | activity.py | 5 | ||||
-rw-r--r-- | activity/activity.info | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/activity.py b/activity.py index 26e411e..2490f23 100644 --- a/activity.py +++ b/activity.py @@ -80,7 +80,10 @@ class AcousticMeasureActivity(Activity): #self.set_title(gettext('Acoustic Tape Measure Activity')) self._logger = logging.getLogger('acousticmeasure-activity') - self._logger.debug("locale: " + locale.setlocale(locale.LC_ALL, '')) + try: + self._logger.debug("locale: " + locale.setlocale(locale.LC_ALL, '')) + except locale.Error: + self._logger.error("setlocale failed") # top toolbar with share and close buttons: toolbox = ActivityToolbox(self) diff --git a/activity/activity.info b/activity/activity.info index 23976f6..3b04c03 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -3,6 +3,6 @@ name = Distance service_name = org.laptop.AcousticMeasure class = activity.AcousticMeasureActivity icon = activity-acousticmeasure -activity_version = 17 +activity_version = 18 license = GPLv2+ show_launcher = yes |