[pypy-svn] rev 2561 - pypy/trunk/src/pypy/objspace/std

pmaupin at codespeak.net pmaupin at codespeak.net
Fri Dec 19 14:19:01 CET 2003


Author: pmaupin
Date: Fri Dec 19 14:19:01 2003
New Revision: 2561

Modified:
   pypy/trunk/src/pypy/objspace/std/typeobject.py
Log:
Propagate attribute error to app level

Modified: pypy/trunk/src/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/typeobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/typeobject.py	Fri Dec 19 14:19:01 2003
@@ -51,7 +51,8 @@
         space = w_self.space
         multimethods = getmultimethods(space.__class__, w_self.__class__)
         key = space.unwrap(w_key)
-        assert isinstance(key, str)
+        if not isinstance(key, str):
+            raise OperationError(space.w_TypeError,space.wrap('attribute name must be string'))
         try:
             code = multimethods[key]
         except KeyError:


More information about the Pypy-commit mailing list