From fa4fd0a19461bb10864910fbab166f6713c9e8f5 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 26 Mar 2010 05:56:52 +0100 Subject: ranger.__main__: setlocale fix --- ranger/__main__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ranger/__main__.py b/ranger/__main__.py index bd01bf4a..9b932bd3 100644 --- a/ranger/__main__.py +++ b/ranger/__main__.py @@ -100,9 +100,10 @@ def main(): 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 #sometimes there is none available though... - else: - setlocale(LC_ALL, '') + except: pass + else: break + else: setlocale(LC_ALL, '') + else: setlocale(LC_ALL, '') arg = parse_arguments() ranger.arg = arg -- cgit 1.4.1-2-gfad0