projects
/
irker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e4245c
)
Only convert to unicode when needed
author
Laurent Bachelier
<laurent@bachelier.name>
Sun, 1 Dec 2013 19:13:23 +0000
(20:13 +0100)
committer
Eric S. Raymond
<esr@thyrsus.com>
Wed, 4 Dec 2013 00:33:53 +0000
(19:33 -0500)
Otherwise, it would crash if any unicode string was already
present.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
irkerhook.py
patch
|
blob
|
history
diff --git
a/irkerhook.py
b/irkerhook.py
index 35f305af37e6dbf3a2ff364399aa8b270ef36d69..c7c7b0d585ab9a9da8747ed9eba750323c2972bb 100755
(executable)
--- 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."