From 1621d0980cf930509b0835a61d90da012eb3958d Mon Sep 17 00:00:00 2001 From: Morgan Goose Date: Fri, 23 Jun 2017 17:53:12 -0700 Subject: [PATCH] Updating to have this encode as configured Was getting some stack traces when this was writing out UTF-8 git commit log content. Made this change locally to address. --- src/gitchangelog/gitchangelog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gitchangelog/gitchangelog.py b/src/gitchangelog/gitchangelog.py index 8e482c1..9a1c67f 100755 --- a/src/gitchangelog/gitchangelog.py +++ b/src/gitchangelog/gitchangelog.py @@ -1446,7 +1446,7 @@ def FileInsertAtFirstRegexMatch(filename, pattern, flags=0, def write_content(f, content): for content_line in content: - f.write(content_line) + f.write(content_line.encode(_prefered_encoding)) def _wrapped(content): index = idx(_file_regex_match(filename, pattern, flags=flags))