[#2957] [GTKUI] Fix AttributeError in torrentview column sort
This commit is contained in:
parent
14d9b6cfcb
commit
c2c0fe86f9
|
@ -31,8 +31,13 @@ def str_nocase_sort(model, iter1, iter2, data):
|
|||
Sort string column data with locale.strcoll which (allegedly) uses ISO 14651.
|
||||
|
||||
"""
|
||||
v1 = model[iter1][data].lower()
|
||||
v2 = model[iter2][data].lower()
|
||||
try:
|
||||
v1 = model[iter1][data].lower()
|
||||
v2 = model[iter2][data].lower()
|
||||
except AttributeError:
|
||||
# Catch None type for value.
|
||||
v1 = model[iter1][data]
|
||||
v2 = model[iter2][data]
|
||||
return strcoll(v1, v2)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue