[pypy-svn] r75068 - pypy/branch/unfreeze-encodings/pypy/module/sys
arigo at codespeak.net
arigo at codespeak.net
Thu Jun 3 19:51:56 CEST 2010
Author: arigo
Date: Thu Jun 3 19:51:54 2010
New Revision: 75068
Modified:
pypy/branch/unfreeze-encodings/pypy/module/sys/interp_encoding.py
Log:
Add another assert.
Modified: pypy/branch/unfreeze-encodings/pypy/module/sys/interp_encoding.py
==============================================================================
--- pypy/branch/unfreeze-encodings/pypy/module/sys/interp_encoding.py (original)
+++ pypy/branch/unfreeze-encodings/pypy/module/sys/interp_encoding.py Thu Jun 3 19:51:54 2010
@@ -18,6 +18,8 @@
space.sys.defaultencoding = encoding
def get_w_default_encoder(space):
+ assert not (space.config.translating and not we_are_translated()), \
+ "get_w_default_encoder() should not be called during translation"
w_encoding = space.wrap(space.sys.defaultencoding)
mod = space.getbuiltinmodule("_codecs")
w_lookup = space.getattr(mod, space.wrap("lookup"))
More information about the Pypy-commit
mailing list