[pypy-svn] pypy default: Fix for the previous test.

arigo commits-noreply at bitbucket.org
Sat Jan 29 19:41:56 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41458:74972a6c0ff9
Date: 2011-01-29 19:41 +0100
http://bitbucket.org/pypy/pypy/changeset/74972a6c0ff9/

Log:	Fix for the previous test.

diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -534,6 +534,10 @@
         Delete the value of the slot 'member' from the given 'obj'."""
         self = member
         self.typecheck(space, w_obj)
+        w_oldresult = w_obj.getslotvalue(self.index)
+        if w_oldresult is None:
+            raise OperationError(space.w_AttributeError,
+                                 space.wrap(self.name)) # XXX better message
         w_obj.setslotvalue(self.index, None)
 
 Member.typedef = TypeDef(


More information about the Pypy-commit mailing list