diff options
author | hut <hut@lavabit.com> | 2010-05-17 20:09:42 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-05-17 20:09:42 +0200 |
commit | d213c6b6eb252df03e4fbbe97e7e71876da8c309 (patch) | |
tree | f923550d138eaac5b099f4eb25ca7d9951dfddea | |
parent | d0e56912638b2a90bb960574ceb5c0bbbf415aca (diff) | |
download | ranger-d213c6b6eb252df03e4fbbe97e7e71876da8c309.tar.gz |
main: removed unnecessary complex locale handling
-rw-r--r-- | ranger/__main__.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py index 887f8e28..f941299e 100644 --- a/ranger/__main__.py +++ b/ranger/__main__.py @@ -19,6 +19,7 @@ import os import sys import ranger +import locale from optparse import OptionParser, SUPPRESS_HELP from ranger.ext.openstruct import OpenStruct @@ -153,14 +154,7 @@ def main(): print('ranger requires the python curses module. Aborting.') sys.exit(1) - # Ensure that a utf8 locale is set. - if getdefaultlocale()[1] not in ('utf8', 'UTF-8'): - for locale in ('en_US.utf8', 'en_US.UTF-8'): - try: setlocale(LC_ALL, locale) - except: pass - else: break - else: setlocale(LC_ALL, '') - else: setlocale(LC_ALL, '') + locale.setlocale(locale.LC_ALL, '') arg = parse_arguments() ranger.arg = arg |