HBASE-20910 Fix dev-support/submit-patch.py by opening file with 'b' mode Signed-off-by: tedyu <yuzhih...@gmail.com> Signed-off-by: Mike Drob <md...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2eee7a3f Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2eee7a3f Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2eee7a3f Branch: refs/heads/HBASE-20749 Commit: 2eee7a3f8bc9749c10e9d311a55696e66fd0b09d Parents: eb906e2 Author: Ankit Singhal <ankitsingha...@gmail.com> Authored: Fri Jul 20 15:23:38 2018 -0700 Committer: tedyu <yuzhih...@gmail.com> Committed: Fri Jul 20 15:31:11 2018 -0700 ---------------------------------------------------------------------- dev-support/submit-patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/2eee7a3f/dev-support/submit-patch.py ---------------------------------------------------------------------- diff --git a/dev-support/submit-patch.py b/dev-support/submit-patch.py index ad39495..f5d772f 100755 --- a/dev-support/submit-patch.py +++ b/dev-support/submit-patch.py @@ -249,7 +249,7 @@ logger.info(" Patch name: %s", patch_filename) patch_filepath = os.path.join(patch_dir, patch_filename) diff = git.format_patch(base_branch, stdout = True) -with open(patch_filepath, "w") as f: +with open(patch_filepath, "wb") as f: f.write(diff.encode('utf8')) if args.jira_id is not None: