From 52225b5069f9a72b644812bc600145e657028a0f Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sat, 23 Dec 2017 02:31:58 -0500 Subject: [PATCH] git (post-receive-alternativearch): treat diff as unicode The commit message and diff is stored in `full_change` as a string. This is passed to `TEXT` which is a unicode string. When a commit message or diff contains non-ascii characters we get: UnicodeDecodeError: 'ascii' codec can't decode byte ... Treat `full_change` as a unicode string. Fixes #6040. --- roles/git/hooks/files/post-receive-alternativearch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/git/hooks/files/post-receive-alternativearch b/roles/git/hooks/files/post-receive-alternativearch index 16d8cef4d..30283da82 100755 --- a/roles/git/hooks/files/post-receive-alternativearch +++ b/roles/git/hooks/files/post-receive-alternativearch @@ -164,7 +164,7 @@ def run_as_post_receive_hook(): if DEBUG: print('List of commits:', new_commits_list) - full_change = '' + full_change = u'' exclude_arch = {} for commit in new_commits_list: if DEBUG: -- 2.15.1