From 113cc218f82571cf07956c7ac0e75f039729eb83 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Sun, 1 Dec 2013 20:13:23 +0100 Subject: [PATCH] Only convert to unicode when needed Otherwise, it would crash if any unicode string was already present. Signed-off-by: Eric S. Raymond --- irkerhook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irkerhook.py b/irkerhook.py index 35f305a..c7c7b0d 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -88,7 +88,8 @@ class Commit: self.url = webview except IOError: self.url = "" - return unicode(self.template % self.__dict__, "utf-8") + res = self.template % self.__dict__ + return unicode(res, 'UTF-8') if not isinstance(res, unicode) else res class GenericExtractor: "Generic class for encapsulating data from a VCS." -- 2.26.2