diff options
author | Armin Rigo <arigo@tunes.org> | 2014-08-31 12:33:37 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2014-08-31 12:33:37 +0200 |
commit | c1c860f633ec87a4951f4681758db9c8f95d4f1a (patch) | |
tree | fdf2dcedb565f233df0701acef90f75fd4276dda /py | |
parent | Extend rpython.rlib.rpath to include the following functions: (diff) | |
download | pypy-c1c860f633ec87a4951f4681758db9c8f95d4f1a.tar.gz pypy-c1c860f633ec87a4951f4681758db9c8f95d4f1a.tar.bz2 pypy-c1c860f633ec87a4951f4681758db9c8f95d4f1a.zip |
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.
Diffstat (limited to 'py')
-rw-r--r-- | py/_code/code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/_code/code.py b/py/_code/code.py index aa60da8017..0e632992b2 100644 --- a/py/_code/code.py +++ b/py/_code/code.py @@ -588,7 +588,7 @@ class FormattedExcinfo(object): 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 |