Mac OS X: Avoid exit when set locale fails

This commit is contained in:
Thomas Perl 2011-03-03 13:09:23 +01:00
parent a68ead6ac1
commit fa169718d1
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ N_ = gpodder.ngettext
import locale
locale.setlocale(locale.LC_ALL, '')
try:
locale.setlocale(locale.LC_ALL, '')
except Exception, e:
log('Warning: Cannot set locale (%s).', e)
# Native filesystem encoding detection
encoding = sys.getfilesystemencoding()