mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-03 08:04:07 +01:00
Catch sort errors in ChannelUserDB.
In case the dictionnary has both integers and strings as keys, items.sort() raises a TypeError.
This commit is contained in:
parent
16aeaaa4fe
commit
124e292f1f
@ -313,7 +313,12 @@ class ChannelUserDB(ChannelUserDictionary):
|
||||
self.__class__.__name__)
|
||||
fd.rollback()
|
||||
return
|
||||
items.sort()
|
||||
try:
|
||||
items.sort()
|
||||
except TypeError:
|
||||
# FIXME: Implement an algorithm that can order dictionnaries
|
||||
# with both strings and integers as keys.
|
||||
pass
|
||||
for ((channel, id), v) in items:
|
||||
L = self.serialize(v)
|
||||
L.insert(0, id)
|
||||
|
Loading…
Reference in New Issue
Block a user