Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r48045:d59c68a96b3b
Date: 2011-10-14 02:04 +0200
http://bitbucket.org/pypy/pypy/changeset/d59c68a96b3b/
Log: posix.environ is a dict of bytes, os.environ decode these with the
fsencoding.
diff --git a/pypy/module/posix/interp_posix.py
b/pypy/module/posix/interp_posix.py
--- a/pypy/module/posix/interp_posix.py
+++ b/pypy/module/posix/interp_posix.py
@@ -510,7 +510,7 @@
def _convertenviron(space, w_env):
space.call_method(w_env, 'clear')
for key, value in os.environ.items():
- space.setitem(w_env, space.wrap(key), space.wrap(value))
+ space.setitem(w_env, space.wrapbytes(key), space.wrapbytes(value))
@unwrap_spec(name=str, value=str)
def putenv(space, name, value):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit