Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r59136:9e265c64b4b6
Date: 2012-11-29 14:09 -0800
http://bitbucket.org/pypy/pypy/changeset/9e265c64b4b6/
Log: update the exception message
diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -226,8 +226,8 @@
w_type = space.exception_getclass(w_inst)
if not space.exception_is_valid_class_w(w_type):
typename = w_type.getname(space)
- msg = ("exceptions must be old-style classes or derived "
- "from BaseException, not %s")
+ msg = ("exceptions must be classes or instances deriving from "
+ "BaseException, not %s")
raise operationerrfmt(space.w_TypeError, msg, typename)
return w_type
diff --git a/pypy/interpreter/test/test_interpreter.py
b/pypy/interpreter/test/test_interpreter.py
--- a/pypy/interpreter/test/test_interpreter.py
+++ b/pypy/interpreter/test/test_interpreter.py
@@ -73,8 +73,8 @@
raise 1
''', 'f', [])
assert "TypeError:" in x
- assert ("exceptions must be old-style classes "
- "or derived from BaseException") in x
+ assert ("exceptions must be classes or instances deriving from "
+ "BaseException, not ") in x
def test_except2(self):
x = self.codetest('''
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit