From 2c5eb64f6edc1d4014e103ea3679c173720b6628 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sat, 6 Jul 2013 21:49:03 +0200 Subject: [PATCH] sort fix --- openlp/core/utils/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index bfd0b0740..3529884d3 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -395,9 +395,10 @@ def get_natural_key(string): """ key = DIGITS_OR_NONDIGITS.findall(string) key = [int(part) if part.isdigit() else get_locale_key(part) for part in key] - # Python 3 does not support comparision of different types anymore. So make sure, that we do not compare str and int. - #if string[0].isdigit(): - # return [''] + key + # Python 3 does not support comparision of different types anymore. So make sure, that we do not compare str + # and int. + if string[0].isdigit(): + return [b''] + key return key