Skip to content

Commit 327a539

Browse files
committed
Replace removed cmp parameter of list.sort() by key in getSortedAccounts()
1 parent ced7b4d commit 327a539

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/bitmessageqt/account.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ def getSortedAccounts():
2222
"""Get a sorted list of address config sections"""
2323
configSections = BMConfigParser().addresses()
2424
configSections.sort(
25-
cmp=lambda x, y: cmp(
26-
BMConfigParser().get(x, 'label').decode('utf-8').lower(),
27-
BMConfigParser().get(y, 'label').decode('utf-8').lower())
28-
)
25+
key=lambda item:
26+
BMConfigParser().get(item, 'label').decode('utf-8').lower())
2927
return configSections
3028

3129

0 commit comments

Comments
 (0)