From c75d4e9962bdbe6abd7e5704c9c1ed191610ce96 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Tue, 18 Feb 2014 16:37:59 -0800 Subject: [PATCH] Don't attempt locale-aware sorting for now. On Python 2, locale.strxfrm() can't handle unicode. --- IPython/html/services/notebooks/filenbmanager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IPython/html/services/notebooks/filenbmanager.py b/IPython/html/services/notebooks/filenbmanager.py index 820e80a43..64312955e 100644 --- a/IPython/html/services/notebooks/filenbmanager.py +++ b/IPython/html/services/notebooks/filenbmanager.py @@ -18,7 +18,6 @@ Authors: #----------------------------------------------------------------------------- import io -import locale import os import glob import shutil @@ -33,8 +32,8 @@ from IPython.utils import tz from IPython.html.utils import is_hidden, to_os_path def sort_key(item): - """Case-insensitive, locale aware sorting.""" - return locale.strxfrm(item['name'].lower()) + """Case-insensitive sorting.""" + return item['name'].lower() #----------------------------------------------------------------------------- # Classes