[pypy-svn] r75036 - pypy/branch/unfreeze-encodings/pypy/module/_codecs
fijal at codespeak.net
fijal at codespeak.net
Thu Jun 3 00:54:11 CEST 2010
Author: fijal
Date: Thu Jun 3 00:54:10 2010
New Revision: 75036
Modified:
pypy/branch/unfreeze-encodings/pypy/module/_codecs/interp_codecs.py
Log:
Remove some nonsense. call_function will raise correct exception if asked, it's
better than exploding with an rpython assertion error
Modified: pypy/branch/unfreeze-encodings/pypy/module/_codecs/interp_codecs.py
==============================================================================
--- pypy/branch/unfreeze-encodings/pypy/module/_codecs/interp_codecs.py (original)
+++ pypy/branch/unfreeze-encodings/pypy/module/_codecs/interp_codecs.py Thu Jun 3 00:54:10 2010
@@ -218,11 +218,8 @@
else:
encoding = space.str_w(w_encoding)
w_encoder = space.getitem(lookup_codec(space, encoding), space.wrap(0))
- if space.is_true(w_encoder):
- w_res = space.call_function(w_encoder, w_obj, space.wrap(errors))
- return space.getitem(w_res, space.wrap(0))
- else:
- assert 0, "XXX, what to do here?"
+ w_res = space.call_function(w_encoder, w_obj, space.wrap(errors))
+ return space.getitem(w_res, space.wrap(0))
encode.unwrap_spec = [ObjSpace, W_Root, W_Root, str]
def buffer_encode(space, s, errors='strict'):
More information about the Pypy-commit
mailing list