[pypy-svn] r15086 - pypy/dist/pypy/lib
arigo at codespeak.net
arigo at codespeak.net
Tue Jul 26 09:41:16 CEST 2005
Author: arigo
Date: Tue Jul 26 09:41:13 2005
New Revision: 15086
Modified:
pypy/dist/pypy/lib/marshal.py
Log:
Raise ValueError instead of AssertionError for marshal.dump(<class>)
Modified: pypy/dist/pypy/lib/marshal.py
==============================================================================
--- pypy/dist/pypy/lib/marshal.py (original)
+++ pypy/dist/pypy/lib/marshal.py Tue Jul 26 09:41:13 2005
@@ -83,7 +83,8 @@
dispatch[bool] = dump_bool
def dump_stopiter(self, x):
- assert x is StopIteration
+ if x is not StopIteration:
+ raise ValueError, "unmarshallable object"
self.f.write(TYPE_STOPITER)
dispatch[type(StopIteration)] = dump_stopiter
More information about the Pypy-commit
mailing list