Browse Source

HOTFIX; Encode/decode to utf-8 for commit title IO in kafka-merge-pr.py after KAFKA-2384

This fix should be fine for Linux and OS X. Not sure about Windows though. This is a very specific fix for new functionality added in KAFKA-2384. There are other places where a similar error could occur, but are less likely.

The script doesn't really support Unicode input at the moment.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Guozhang

Closes #109 from ijuma/kafka-2384-hotfix and squashes the following commits:

0ab8958 [Ismael Juma] Encode/decode to utf-8 for commit title IO in kafka-merge-pr.py
pull/111/head
Ismael Juma 9 years ago committed by Guozhang Wang
parent
commit
1a0179f21a
  1. 2
      kafka-merge-pr.py

2
kafka-merge-pr.py

@ -381,7 +381,7 @@ def main(): @@ -381,7 +381,7 @@ def main():
url = pr["url"]
pr_title = pr["title"]
commit_title = raw_input("Commit title [%s]: " % pr_title)
commit_title = raw_input("Commit title [%s]: " % pr_title.encode("utf-8")).decode("utf-8")
if commit_title == "":
commit_title = pr_title

Loading…
Cancel
Save