Author: Armin Rigo <[email protected]>
Branch:
Changeset: r73222:0867fc01e680
Date: 2014-08-31 12:33 +0200
http://bitbucket.org/pypy/pypy/changeset/0867fc01e680/
Log: Accept a plain string and don't try to decode it to unicode and then
re-encode it to utf-8. It may not work.
diff --git a/py/_code/code.py b/py/_code/code.py
--- a/py/_code/code.py
+++ b/py/_code/code.py
@@ -588,7 +588,7 @@
class TerminalRepr:
def __str__(self):
s = self.__unicode__()
- if sys.version_info[0] < 3:
+ if sys.version_info[0] < 3 and isinstance(s, unicode):
s = s.encode('utf-8')
return s
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit