Merge "Fix sort comparison function"

This commit is contained in:
Zuul 2020-03-17 23:20:12 +00:00 committed by Gerrit Code Review
commit afb0d7f736

View File

@ -185,9 +185,7 @@ def print_languages():
"""Print a list of all supported languages, with description."""
xmlrpc = get_xmlrpc_service()
languages = xmlrpc.pastes.getLanguages().items()
languages.sort(
lambda a, b: (a[1].lower() > b[1].lower())-(a[1].lower() < b[1].lower())
)
languages.sort(key=lambda a: a[1].lower())
print('Supported Languages:')
for alias, name in languages:
print(' %-30s%s' % (alias, name))