Commits

Amaury Forgeot d'Arc committed d59c68a

posix.environ is a dict of bytes, os.environ decode these with the fsencoding.

Comments (0)

Files changed (1)

pypy/module/posix/interp_posix.py

 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):