From: Abhishek Varshney Date: Thu, 18 Feb 2016 15:08:57 +0000 (+0530) Subject: Fix unicode encoding for non-ASCII characters in title and author names X-Git-Tag: v10.1.0~333^2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=284075cc0ffca0256077c195c5b4cff9e8e08995;p=ceph.git Fix unicode encoding for non-ASCII characters in title and author names Signed-off-by: Abhishek Varshney Reviewed-by: Loic Dachary --- diff --git a/src/script/ceph-release-notes b/src/script/ceph-release-notes index 925c1d2388f9..7f7cd88eab6d 100755 --- a/src/script/ceph-release-notes +++ b/src/script/ceph-release-notes @@ -124,7 +124,7 @@ def make_release_notes(gh, repo, ref, plaintext, verbose, strict): title_re = '^(?:hammer|infernalis|jewel|kraken): (cli|common|mon|osd|fs|librbd|rbd|fs|mds|objecter|rgw|build/ops|tests|tools|cmake|doc|crush|librados)(:.*)' match = re.match(title_re, title) if not match: - print ("ERROR: http://github.com/ceph/ceph/pull/" + str(number) + " title " + title + " does not match " + title_re) + print ("ERROR: http://github.com/ceph/ceph/pull/" + str(number) + " title " + title.encode("utf-8") + " does not match " + title_re) else: title = match.group(1) + match.group(2) @@ -153,9 +153,9 @@ def make_release_notes(gh, repo, ref, plaintext, verbose, strict): else: issues = '' if plaintext: - print (u"* {title} ({issues}{author})".format(title=title, issues=issues, author=author)) + print ("* {title} ({issues}{author})".format(title=title.encode("utf-8"), issues=issues, author=author.encode("utf-8"))) else: - print (u"* {title} ({issues}`pr#{pr} `_, {author})".format(title=title, issues=issues, author=author, pr=pr)) + print ("* {title} ({issues}`pr#{pr} `_, {author})".format(title=title.encode("utf-8"), issues=issues, author=author.encode("utf-8"), pr=pr)) if message: print (message)