]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: ceph-release-notes: fix sorted() key lambda regression
authorNathan Cutler <ncutler@suse.com>
Wed, 19 Jul 2017 07:37:31 +0000 (09:37 +0200)
committerNathan Cutler <ncutler@suse.com>
Wed, 19 Jul 2017 07:40:25 +0000 (09:40 +0200)
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 <ncutler@suse.com>
src/script/ceph-release-notes

index 14f85ba44ff6bbd9fd22d3662e32ae1dd1821b6c..6faac1cf72500b4adc56e70926efd600585ef311 100755 (executable)
@@ -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: