##// END OF EJS Templates
py3: make sure decode() first argument is str...
Pulkit Goyal -
r37640:bfdd20d2 default
parent child Browse files
Show More
@@ -217,12 +217,13 b' class converter_source(object):'
217 if isinstance(s, unicode):
217 if isinstance(s, unicode):
218 return s.encode("utf-8")
218 return s.encode("utf-8")
219 try:
219 try:
220 return s.decode(encoding).encode("utf-8")
220 return s.decode(pycompat.sysstr(encoding)).encode("utf-8")
221 except UnicodeError:
221 except UnicodeError:
222 try:
222 try:
223 return s.decode("latin-1").encode("utf-8")
223 return s.decode("latin-1").encode("utf-8")
224 except UnicodeError:
224 except UnicodeError:
225 return s.decode(encoding, "replace").encode("utf-8")
225 return s.decode(pycompat.sysstr(encoding),
226 "replace").encode("utf-8")
226
227
227 def getchangedfiles(self, rev, i):
228 def getchangedfiles(self, rev, i):
228 """Return the files changed by rev compared to parent[i].
229 """Return the files changed by rev compared to parent[i].
General Comments 0
You need to be logged in to leave comments. Login now