Backport of fix from trunk

This commit is contained in:
Tomas Groth 2016-05-16 12:14:37 +02:00
parent df840d7705
commit 94a8057a6a

View File

@ -529,7 +529,7 @@ def get_natural_key(string):
key = [int(part) if part.isdigit() else get_locale_key(part) for part in key]
# Python 3 does not support comparison of different types anymore. So make sure, that we do not compare str
# and int.
if string[0].isdigit():
if string and string[0].isdigit():
return [b''] + key
return key