about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-26 05:56:52 +0100
committerhut <hut@lavabit.com>2010-03-26 05:56:52 +0100
commitfa4fd0a19461bb10864910fbab166f6713c9e8f5 (patch)
treed054a486d8ef5a40e811a87b101bb5618b4bc073
parente30d16cb17b54a77246caf7822da5e7179f22902 (diff)
downloadranger-fa4fd0a19461bb10864910fbab166f6713c9e8f5.tar.gz
ranger.__main__: setlocale fix
-rw-r--r--ranger/__main__.py7
1 files 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