This commit is contained in:
Kovid Goyal 2020-10-24 13:24:46 +05:30
parent e0c9b3cdbc
commit 0b973057d0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -24,7 +24,10 @@ def none_cmp(xx, yy):
y = yy[1]
if x is None and y is None:
# No sort_key needed here, because defaults are ascii
return cmp(xx[2], yy[2])
try:
return cmp(xx[2], yy[2])
except TypeError:
return 0
if x is None:
return 1
if y is None: