diff options
| -rw-r--r-- | src/pyramid/httpexceptions.py | 2 | ||||
| -rw-r--r-- | tests/test_httpexceptions.py | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/pyramid/httpexceptions.py b/src/pyramid/httpexceptions.py index c8af559e3..9fd5f7d55 100644 --- a/src/pyramid/httpexceptions.py +++ b/src/pyramid/httpexceptions.py @@ -143,8 +143,6 @@ def _no_escape(value): if value is None: return '' if not isinstance(value, str): - if hasattr(value, '__unicode__'): - value = value.__unicode__() if isinstance(value, bytes): value = text_(value, 'utf-8') else: diff --git a/tests/test_httpexceptions.py b/tests/test_httpexceptions.py index a246dbaa6..73469778a 100644 --- a/tests/test_httpexceptions.py +++ b/tests/test_httpexceptions.py @@ -75,7 +75,7 @@ class Test__no_escape(unittest.TestCase): def test_unicode(self): class DummyUnicodeObject: - def __unicode__(self): + def __str__(self): return text_('42') duo = DummyUnicodeObject() |
