Skip to content
Snippets Groups Projects
Commit 113cc218 authored by Laurent Bachelier's avatar Laurent Bachelier Committed by Eric S. Raymond
Browse files

Only convert to unicode when needed


Otherwise, it would crash if any unicode string was already
present.

Signed-off-by: default avatarEric S. Raymond <esr@thyrsus.com>
parent 3e4245c6
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment