[pypy-commit] pypy py3k: handle windows unicode results
pjenvey
noreply at buildbot.pypy.org
Tue Apr 9 20:11:45 CEST 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r63170:40bcfcc5aae5
Date: 2013-04-09 11:10 -0700
http://bitbucket.org/pypy/pypy/changeset/40bcfcc5aae5/
Log: handle windows unicode results
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
@@ -533,8 +533,11 @@
len_result = len(result)
result_w = [None] * len_result
for i in range(len_result):
- w_bytes = space.wrapbytes(result[i])
- result_w[i] = space.fsdecode(w_bytes)
+ if _WIN32:
+ result_w[i] = space.wrap(result[i])
+ else:
+ w_bytes = space.wrapbytes(result[i])
+ result_w[i] = space.fsdecode(w_bytes)
else:
dirname = space.str0_w(w_dirname)
result = rposix.listdir(dirname)
More information about the pypy-commit
mailing list