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 /activity.py | |
parent | 8c1755b2cf7501779ff4a3026a5f2f2c5382ff10 (diff) |
Catch setlocale error to fix DLO#9888
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 5 |
1 files changed, 4 insertions, 1 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) |