mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
[#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.
|
Sort string column data with locale.strcoll which (allegedly) uses ISO 14651.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
v1 = model[iter1][data].lower()
|
v1 = model[iter1][data].lower()
|
||||||
v2 = model[iter2][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)
|
return strcoll(v1, v2)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user