[pypy-svn] r27618 - pypy/dist/pypy/objspace/std

ericvrp at codespeak.net ericvrp at codespeak.net
Tue May 23 12:20:57 CEST 2006


Author: ericvrp
Date: Tue May 23 12:20:56 2006
New Revision: 27618

Modified:
   pypy/dist/pypy/objspace/std/dicttype.py
Log:
Should use an OperationError here instead of a regular Exception


Modified: pypy/dist/pypy/objspace/std/dicttype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/dicttype.py	(original)
+++ pypy/dist/pypy/objspace/std/dicttype.py	Tue May 23 12:20:56 2006
@@ -153,7 +153,8 @@
     elif isinstance(w_self, W_DictIter_Items):
         w_clone = space.allocate_instance(W_DictIter_Items, w_typeobj)
     else:
-        raise Exception("%s has unknown dictiter type" % w_self)
+        msg = "unsupported dictiter type '%s' during pickling" % (w_self, )
+        raise OperationError(space.w_TypeError, space.wrap(msg))
     # we cannot call __init__ since we don't have the original dict
     w_clone.space = space
     w_clone.content = w_self.content



More information about the Pypy-commit mailing list