From: Loic Dachary Date: Tue, 4 Aug 2015 14:06:23 +0000 (+0200) Subject: tools: ceph-release-notes unicode handling X-Git-Tag: v9.1.0~269^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aebb9e79744f09a1735c4766b35aa530c7ddb730;p=ceph.git tools: ceph-release-notes unicode handling Prefix the print string with u so that it handles unicode gracefully. Add the cli prefix (for ceph.in related pull requests) Signed-off-by: Loic Dachary --- diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index e59efd353cac..007054d52f02 100755 --- a/src/script/ceph-release-notes +++ b/src/script/ceph-release-notes @@ -64,7 +64,7 @@ def make_release_notes(gh, repo, ref, plaintext): title = pr['title'] - title_re = '^(common|mon|osd|fs|librbd|rbd|fs|mds|objecter|rgw|build/ops|tests|tools|doc|crush|librados):' + title_re = '^(cli|common|mon|osd|fs|librbd|rbd|fs|mds|objecter|rgw|build/ops|tests|tools|doc|crush|librados):' if not re.match(title_re, title): print ("ERROR: http://github.com/ceph/ceph/pull/" + str(number) + " title " + title + " does not match " + title_re) # Big assumption, do a sanity check in the end, we are @@ -80,9 +80,9 @@ def make_release_notes(gh, repo, ref, plaintext): print (">>>>>>> " + str(len(prs)) + " pr for issue " + issue) for (author, title, number) in prs: if plaintext: - print ("* {title} (#{issue}, {author})".format(title=title, issue=issue, author=author)) + print (u"* {title} (#{issue}, {author})".format(title=title, issue=issue, author=author)) else: - print ("* {title} (`issue#{issue} `_, `pr#{number} `_, {author})".format(title=title, issue=issue, author=author, number=number)) + print (u"* {title} (`issue#{issue} `_, `pr#{number} `_, {author})".format(title=title, issue=issue, author=author, number=number)) if __name__ == "__main__":