From: Nathan Cutler Date: Wed, 19 Jul 2017 07:37:31 +0000 (+0200) Subject: tools: ceph-release-notes: fix sorted() key lambda regression X-Git-Tag: v12.1.2~230^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=96c672e89181f7e9d59f03e4842ade55d418021f;p=ceph.git tools: ceph-release-notes: fix sorted() key lambda regression https://github.com/ceph/ceph/pull/16261 ported the script to Python 3, but it retained the 2-argument version of the sorted() key function - in Python 3 the key function takes only one argument. Signed-off-by: Nathan Cutler --- diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index 14f85ba44ff6b..6faac1cf72500 100755 --- a/src/script/ceph-release-notes +++ b/src/script/ceph-release-notes @@ -218,7 +218,7 @@ def make_release_notes(gh, repo, ref, plaintext, verbose, strict, use_tags): issue + " " + str(prs)) for (pr, (author, title, message)) in sorted( - pr2info.items(), key=lambda k, v: (v[2], v[1]) + pr2info.items(), key=lambda title: title[1][1] ): if pr in pr2issues: if plaintext: