From bda4085a24742a76ac1571ee850075340c0d8338 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Wed, 22 Oct 2008 05:07:24 -0700 Subject: [PATCH] models: add unicode/i18n support for get_latest_commitmsg() Signed-off-by: David Aguilar --- cola/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cola/models.py b/cola/models.py index 57312a89..44b2da9e 100644 --- a/cola/models.py +++ b/cola/models.py @@ -473,9 +473,10 @@ class Model(model.Model): """Queries git for the latest commit message and sets it in self.commitmsg.""" commit_msg = [] - commit_lines = self.git.show('HEAD').split('\n') + commit_lines = self.git.show('HEAD').decode('utf-8').split('\n') for idx, msg in enumerate(commit_lines): - if idx < 4: continue + if idx < 4: + continue msg = msg.lstrip() if msg.startswith('diff --git'): commit_msg.pop() -- 2.11.4.GIT